API: Make it easier to determine a batch and an on-chain txid given an order
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia leggendo le implementazioni dell’API per list_sidecars e list_orders, quindi segui i dati esistenti di leases e batch_snapshots usati nell’esempio. Definisci in che modo gli ordini o i sidecar corrispondenti espongono il batch ID e il transaction ID, e verifica che i chiamanti possano ottenere entrambi senza iterare sulle altre collection.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
I would like to easily correlate a given order, to a given batch and txid of that batch. Currently I need to iterate over a lot of data in order to finally obtain all of this information.
Describe the solution you'd like
Ideally: when calling list_sidecars or list_orders if the order/sidecar has been matched, it should show the txid and batch id in this API
Describe alternatives you've considered
Currently I am achieving this like so:
# First start with a sidecar id. I got this one by listing the sidecars and finding one that was in the completed state
sidecar_id = b"\3405\254(B\300\225\231"
sidecar_nonce = pool.list_sidecars(sidecar_id).tickets[0].order_bid_nonce
# Obtain the order, associated with the sidecar
# it would be understandable if I could stop here, and get the information I want from the order object
# but I must continue...
for i in pool.list_orders(active_only=False).bids:
if i.details.order_nonce == sidecar_nonce:
order = i
# get the lease txid by matching nonces
target_lease = None
for i in pool.leases(batch_ids=[],accounts=[]).leases:
if i.order_nonce == sidecar_nonce:
target_lease = i
break
lease_txid = target_lease.channel_point.txid[::-1].hex()
# finally get the batch_id by matching batch_txid with the above txid
bs = pool.batch_snapshots(b"", 50)
lease_batch = None
for b in bs.batches:
if b.batch_tx_id == lease_txid:
lease_batch = b.batch_id
break
This is kind of tedious, and also if the database of leases/orders/sidecars is really large, could be very inefficient.
- Lingua principale
- Go
- Stelle
- 256
- Fork
- 53
- Merge medio
- 20h 22m
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lightninglabs/pool
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
lightninglabs/pool#536 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
lightninglabs/pool#514 · 16 commenti ·
-
Ask Orders doesn't settleAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
lightninglabs/pool#478 · 3 commenti ·
-
batch batch execution optimization
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
lightninglabs/pool#456 ·
-
add pool-client initiated pingsForse di nuovo libera @positiveblue l’ha presa 1278 giorni fa e non c’è nessuna pull request aperta. Aperta
lightninglabs/pool#455 · 1 assegnatario ·
Tutte le issue di lightninglabs/pool
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Cojekt/LibreDental#258 ·
I maintainer di solito rispondono entro 1 giorno
-
go good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opensro-dev/opensro#4949 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 3 giorni
-
agent-execution/02 row 4: consumers Verify row lacks delivery/base binding, cannot pass post-mergeApertabug effort:s impact:low raised-by:verifier risk:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
medici-finance/assay#7946 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno