mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-17 23:36:33 +00:00
work around odd error with payForBlock codegen
This commit is contained in:
parent
28593bed1d
commit
94f899b664
@ -304,10 +304,12 @@ proc payForBlocks(engine: BlockExcEngine,
|
|||||||
sendPayment = engine.network.request.sendPayment
|
sendPayment = engine.network.request.sendPayment
|
||||||
price = peer.price(blocksDelivery.mapIt(it.address))
|
price = peer.price(blocksDelivery.mapIt(it.address))
|
||||||
|
|
||||||
if payment =? engine.wallet.pay(peer, price):
|
let payment = engine.wallet.pay(peer, price)
|
||||||
trace "Sending payment for blocks", price
|
if payment.isErr():
|
||||||
# echo "sendPayment"
|
trace "error paying for blocks", price=price
|
||||||
await sendPayment(peer.id, payment)
|
else:
|
||||||
|
trace "Sending payment for blocks", price=price
|
||||||
|
await sendPayment(peer.id, payment.get())
|
||||||
|
|
||||||
proc validateBlockDelivery(
|
proc validateBlockDelivery(
|
||||||
b: BlockExcEngine,
|
b: BlockExcEngine,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user