From 6a332bfeaf7b847229652047563839ef66e0edb0 Mon Sep 17 00:00:00 2001 From: Matthew Zipkin Date: Mon, 1 May 2017 05:05:23 +0000 Subject: [PATCH] init return cb rpc --- lib/http/rpc.js | 1 + lib/primitives/block.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index fea89f63..6032ba54 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -2594,6 +2594,7 @@ RPC.prototype.blockToJSON = co(function* blockToJSON(entry, block, details) { version: entry.version, versionHex: util.hex32(entry.version), merkleroot: util.revHex(entry.merkleRoot), + coinbase: block.txs[0].inputs[0].script, tx: txs, time: entry.ts, mediantime: mtp, diff --git a/lib/primitives/block.js b/lib/primitives/block.js index e16a95e3..e1c31e71 100644 --- a/lib/primitives/block.js +++ b/lib/primitives/block.js @@ -623,6 +623,7 @@ Block.prototype.getJSON = function getJSON(network, view, height) { ts: this.ts, bits: this.bits, nonce: this.nonce, + coinbase: this.txs[0].inputs[0].script, txs: this.txs.map(function(tx, i) { return tx.getJSON(network, view, null, i); }, this)