From ccac98dd5e031bcec1dfae4caf73b7c393c81004 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Wed, 13 Nov 2019 08:40:37 -0800 Subject: [PATCH] Fixed integration test for gettxout --- src/routes/v3/full-node/blockchain.js | 2 ++ test/v3/blockchain.js | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/v3/full-node/blockchain.js b/src/routes/v3/full-node/blockchain.js index 8e2403b..cd3d556 100644 --- a/src/routes/v3/full-node/blockchain.js +++ b/src/routes/v3/full-node/blockchain.js @@ -732,6 +732,8 @@ async function getTxOut(req, res, next) { requestConfig.data.method = "gettxout" requestConfig.data.params = [txid, n, include_mempool] + // console.log(`requestConfig: ${JSON.stringify(requestConfig, null, 2)}`) + const response = await BitboxHTTP(requestConfig) return res.json(response.data.result) diff --git a/test/v3/blockchain.js b/test/v3/blockchain.js index fe1d70b..aee8ed5 100644 --- a/test/v3/blockchain.js +++ b/test/v3/blockchain.js @@ -840,11 +840,12 @@ describe("#BlockchainRouter", () => { .reply(200, { result: mockData.mockTxOut }) } - req.params.txid = `2c7ae9f865f7ce0c33c189b2f83414176903ce4b06ed9f8b7bcf55efbd4a7266` + req.params.txid = `197dcda59864b1eee05498fd3c52cad787ec56ab7e635503cb39f9ab6f295d5d` req.params.n = 1 + req.query.include_mempool = "true" const result = await getTxOut(req, res) - //console.log(`result: ${JSON.stringify(result, null, 2)}`) + // console.log(`result: ${JSON.stringify(result, null, 2)}`) assert.hasAllKeys(result, [ "bestblock",