Multi-Signature

任何人都可以闡明這個錯誤嗎?Bitcore Multisig - bad-txns-in-belowout

  • May 27, 2015

程式碼:

var utxo = new bitcore.Transaction.UnspentOutput({
 "txid" : "e0c6b736e86e8dccd63bbc27f35142b413bd991a410ef50f14cd56fa1a783a1e",
 "vout" : 0,
 "address" : "2NCAeo5p1Pg8VVupFFumCd3PYz551VAZWLJ",
 "scriptPubKey" : "OP_HASH160 20 0xcf8d0490cba6d7ca817323cf0c337fbd0a3de539 OP_EQUAL",
 "amount" : 10000000
});

var multiSigTx = new bitcore.Transaction()
   .from(utxo, pubKeys, 2)
   .to("mwFLeaw5LMAPvoz1hP6qQhHbHkHq8WxM2t", 90000)
   .fee(9000)
   .change("mwFLeaw5LMAPvoz1hP6qQhHbHkHq8WxM2t")
   .sign(privKeys);


var txSerialized = multiSigTx.serialize(true);
insight.broadcast(txSerialized, function(err, returnedTxId) {
 if (err) {
   console.log(err);
 } else {
   console.log("Sent coins, tx id is: ");
   console.log(returnedTxId);
 }
});

結果:

交易被網路拒絕(程式碼 -26)。原因:16:bad-txns-in-belowout

當交易嘗試發送的 Satoshis 多於其花費時,就會發生該錯誤。您可能會混淆您的單位(使用 Satoshis 而不是 BTC,反之亦然)。

引發錯誤的程式碼可以在此處顯示:https ://github.com/bitcoin/bitcoin/blob/v0.10.2/src/main.cpp#L1462-L1465

引用自:https://bitcoin.stackexchange.com/questions/37606