From 4fb2df7789ed32ae612cb3eabcfc6cc8f0d92b12 Mon Sep 17 00:00:00 2001 From: Node Date: Fri, 18 Aug 2017 11:01:43 +0400 Subject: [PATCH 1/2] rpc: createrawtransaction from inputs --- lib/http/rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index a9166591..1005a85d 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -1644,7 +1644,7 @@ RPC.prototype.createRawTransaction = async function createRawTransaction(args, h if (locktime != null) tx.locktime = locktime; - for (const obj of tx.inputs) { + for (const obj of inputs) { const valid = new Validator([obj]); const hash = valid.hash('txid'); const index = valid.u32('vout'); From 29f9d401e459bde1e6e41a90cf1745d66310820e Mon Sep 17 00:00:00 2001 From: Node Date: Fri, 18 Aug 2017 14:35:12 +0400 Subject: [PATCH 2/2] rpc: signrawtransaction input name fix --- lib/http/rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 1005a85d..ce40e1fc 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -1833,7 +1833,7 @@ RPC.prototype.signRawTransaction = async function signRawTransaction(args, help) for (const prev of prevout) { const valid = new Validator([prev]); const hash = valid.hash('txid'); - const index = valid.u32('index'); + const index = valid.u32('vout'); const scriptRaw = valid.buf('scriptPubKey'); const value = valid.ufixed('amount', 8); const redeemRaw = valid.buf('redeemScript');