From a6781e7eedbec8a359432d4363b92294e1c2ea32 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Wed, 1 Nov 2023 17:13:51 -0700 Subject: [PATCH] revert --- codex/blockexchange/engine/engine.nim | 10 ++++------ config.nims | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/codex/blockexchange/engine/engine.nim b/codex/blockexchange/engine/engine.nim index ab5dbc1f..3fc2c024 100644 --- a/codex/blockexchange/engine/engine.nim +++ b/codex/blockexchange/engine/engine.nim @@ -304,12 +304,10 @@ proc payForBlocks(engine: BlockExcEngine, sendPayment = engine.network.request.sendPayment price = peer.price(blocksDelivery.mapIt(it.address)) - let payment = engine.wallet.pay(peer, price) - if payment.isErr(): - trace "error paying for blocks", price=price - else: - trace "Sending payment for blocks", price=price - await sendPayment(peer.id, payment.get()) + if payment =? engine.wallet.pay(peer, price): + trace "Sending payment for blocks", price + # echo "sendPayment" + await sendPayment(peer.id, payment) proc validateBlockDelivery( b: BlockExcEngine, diff --git a/config.nims b/config.nims index ce7b741c..cb96cf55 100644 --- a/config.nims +++ b/config.nims @@ -5,7 +5,6 @@ import std/os const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)] --d:chronosFuturesInstrumentation ---d:release when getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and # BEWARE