mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-29 03:16:40 +01:00
Compare commits
17 Commits
v0.16.2rc2
...
v0.16.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49e34e2880 | ||
|
|
a0f4ff6088 | ||
|
|
86e2f1d4bb | ||
|
|
696b936aa3 | ||
|
|
9bd08fd465 | ||
|
|
d1dee20547 | ||
|
|
9e116a6f87 | ||
|
|
b64f02fcfa | ||
|
|
11b9dbb439 | ||
|
|
6518bcd56c | ||
|
|
8561515022 | ||
|
|
1cdbea7f74 | ||
|
|
212ef1f954 | ||
|
|
1825e37075 | ||
|
|
2848aa808f | ||
|
|
0296b9c85e | ||
|
|
08ca314410 |
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 16)
|
||||
define(_CLIENT_VERSION_REVISION, 2)
|
||||
define(_CLIENT_VERSION_REVISION, 3)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2018)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||
.TH BITCOIN-CLI "1" "January 2018" "bitcoin-cli v0.16.0.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||
.TH BITCOIN-CLI "1" "September 2018" "bitcoin-cli v0.16.3.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-cli \- manual page for bitcoin-cli v0.16.0.0
|
||||
bitcoin-cli \- manual page for bitcoin-cli v0.16.3.0
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core RPC client version v0.16.0.0
|
||||
Bitcoin Core RPC client version v0.16.3.0
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
bitcoin\-cli [options] <command> [params]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||
.TH BITCOIN-QT "1" "January 2018" "bitcoin-qt v0.16.0.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||
.TH BITCOIN-QT "1" "September 2018" "bitcoin-qt v0.16.3.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-qt \- manual page for bitcoin-qt v0.16.0.0
|
||||
bitcoin-qt \- manual page for bitcoin-qt v0.16.3.0
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core version v0.16.0.0 (64\-bit)
|
||||
Bitcoin Core version v0.16.3.0 (64\-bit)
|
||||
Usage:
|
||||
.IP
|
||||
bitcoin\-qt [command\-line options]
|
||||
@@ -97,7 +97,7 @@ blocks if a target size in MiB is provided. This mode is
|
||||
incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting this
|
||||
setting requires re\-downloading the entire blockchain. (default:
|
||||
0 = disable pruning blocks, 1 = allow manual pruning via RPC,
|
||||
>550 = automatically prune block files to stay under the
|
||||
>=550 = automatically prune block files to stay under the
|
||||
specified target size in MiB)
|
||||
.HP
|
||||
\fB\-reindex\-chainstate\fR
|
||||
@@ -469,11 +469,6 @@ Block creation options:
|
||||
.IP
|
||||
Set maximum BIP141 block weight (default: 3996000)
|
||||
.HP
|
||||
\fB\-blockmaxsize=\fR<n>
|
||||
.IP
|
||||
Set maximum BIP141 block weight to this * 4. Deprecated, use
|
||||
blockmaxweight
|
||||
.HP
|
||||
\fB\-blockmintxfee=\fR<amt>
|
||||
.IP
|
||||
Set lowest fee rate (in BTC/kB) for transactions to be included in block
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||
.TH BITCOIN-TX "1" "January 2018" "bitcoin-tx v0.16.0.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||
.TH BITCOIN-TX "1" "September 2018" "bitcoin-tx v0.16.3.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoin-tx \- manual page for bitcoin-tx v0.16.0.0
|
||||
bitcoin-tx \- manual page for bitcoin-tx v0.16.3.0
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core bitcoin\-tx utility version v0.16.0.0
|
||||
Bitcoin Core bitcoin\-tx utility version v0.16.3.0
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
bitcoin\-tx [options] <hex\-tx> [commands]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||
.TH BITCOIND "1" "January 2018" "bitcoind v0.16.0.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||
.TH BITCOIND "1" "September 2018" "bitcoind v0.16.3.0" "User Commands"
|
||||
.SH NAME
|
||||
bitcoind \- manual page for bitcoind v0.16.0.0
|
||||
bitcoind \- manual page for bitcoind v0.16.3.0
|
||||
.SH DESCRIPTION
|
||||
Bitcoin Core Daemon version v0.16.0.0
|
||||
Bitcoin Core Daemon version v0.16.3.0
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
bitcoind [options]
|
||||
@@ -102,7 +102,7 @@ blocks if a target size in MiB is provided. This mode is
|
||||
incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting this
|
||||
setting requires re\-downloading the entire blockchain. (default:
|
||||
0 = disable pruning blocks, 1 = allow manual pruning via RPC,
|
||||
>550 = automatically prune block files to stay under the
|
||||
>=550 = automatically prune block files to stay under the
|
||||
specified target size in MiB)
|
||||
.HP
|
||||
\fB\-reindex\-chainstate\fR
|
||||
@@ -474,11 +474,6 @@ Block creation options:
|
||||
.IP
|
||||
Set maximum BIP141 block weight (default: 3996000)
|
||||
.HP
|
||||
\fB\-blockmaxsize=\fR<n>
|
||||
.IP
|
||||
Set maximum BIP141 block weight to this * 4. Deprecated, use
|
||||
blockmaxweight
|
||||
.HP
|
||||
\fB\-blockmintxfee=\fR<amt>
|
||||
.IP
|
||||
Set lowest fee rate (in BTC/kB) for transactions to be included in block
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Bitcoin Core version 0.16.2 is now available from:
|
||||
Bitcoin Core version 0.16.3 is now available from:
|
||||
|
||||
<https://bitcoincore.org/bin/bitcoin-core-0.16.2/>
|
||||
<https://bitcoincore.org/bin/bitcoin-core-0.16.3/>
|
||||
|
||||
This is a new minor version release, with various bugfixes
|
||||
as well as updated translations.
|
||||
@@ -49,19 +49,42 @@ frequently tested on them.
|
||||
Notable changes
|
||||
===============
|
||||
|
||||
to be filled in
|
||||
Denial-of-Service vulnerability
|
||||
-------------------------------
|
||||
|
||||
0.16.2 change log
|
||||
A denial-of-service vulnerability exploitable by miners has been discovered in
|
||||
Bitcoin Core versions 0.14.0 up to 0.16.2. It is recommended to upgrade any of
|
||||
the vulnerable versions to 0.16.3 as soon as possible.
|
||||
|
||||
0.16.3 change log
|
||||
------------------
|
||||
|
||||
to be filled in
|
||||
### Consensus
|
||||
- #14249 `696b936` Fix crash bug with duplicate inputs within a transaction (TheBlueMatt, sdaftuar)
|
||||
|
||||
### RPC and other APIs
|
||||
- #13547 `212ef1f` Make `signrawtransaction*` give an error when amount is needed but missing (ajtowns)
|
||||
|
||||
### Miscellaneous
|
||||
- #13655 `1cdbea7` bitcoinconsensus: invalid flags error should be set to `bitcoinconsensus_err` (afk11)
|
||||
|
||||
### Documentation
|
||||
- #13844 `11b9dbb` correct the help output for -prune (hebasto)
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Thanks to everyone who directly contributed to this release:
|
||||
|
||||
to be filled in
|
||||
- Anthony Towns
|
||||
- Hennadii Stepanov
|
||||
- Matt Corallo
|
||||
- Suhas Daftuar
|
||||
- Thomas Kerin
|
||||
- Wladimir J. van der Laan
|
||||
|
||||
And to those that reported security issues:
|
||||
|
||||
- beardnboobies
|
||||
|
||||
As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
|
||||
|
||||
@@ -375,7 +375,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
#endif
|
||||
strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. "
|
||||
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
|
||||
"(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
|
||||
"(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >=%u = automatically prune block files to stay under the specified target size in MiB)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
|
||||
strUsage += HelpMessageOpt("-reindex-chainstate", _("Rebuild chain state from the currently indexed blocks"));
|
||||
strUsage += HelpMessageOpt("-reindex", _("Rebuild chain state and block index from the blk*.dat files on disk"));
|
||||
#ifndef WIN32
|
||||
|
||||
@@ -830,7 +830,7 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
|
||||
}
|
||||
Coin newcoin;
|
||||
newcoin.out.scriptPubKey = scriptPubKey;
|
||||
newcoin.out.nValue = 0;
|
||||
newcoin.out.nValue = MAX_MONEY;
|
||||
if (prevOut.exists("amount")) {
|
||||
newcoin.out.nValue = AmountFromValue(find_value(prevOut, "amount"));
|
||||
}
|
||||
@@ -910,6 +910,11 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
|
||||
|
||||
UpdateTransaction(mtx, i, sigdata);
|
||||
|
||||
// amount must be specified for valid segwit signature
|
||||
if (amount == MAX_MONEY && !txin.scriptWitness.IsNull()) {
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Missing amount for %s", coin.out.ToString()));
|
||||
}
|
||||
|
||||
ScriptError serror = SCRIPT_ERR_OK;
|
||||
if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount), &serror)) {
|
||||
if (serror == SCRIPT_ERR_INVALID_STACK_OPERATION) {
|
||||
|
||||
@@ -81,7 +81,7 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP
|
||||
unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
|
||||
{
|
||||
if (!verify_flags(flags)) {
|
||||
return bitcoinconsensus_ERR_INVALID_FLAGS;
|
||||
return set_error(err, bitcoinconsensus_ERR_INVALID_FLAGS);
|
||||
}
|
||||
try {
|
||||
TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
|
||||
|
||||
@@ -1481,4 +1481,146 @@ BOOST_AUTO_TEST_CASE(script_can_append_self)
|
||||
BOOST_CHECK(s == d);
|
||||
}
|
||||
|
||||
|
||||
#if defined(HAVE_CONSENSUS_LIB)
|
||||
|
||||
/* Test simple (successful) usage of bitcoinconsensus_verify_script */
|
||||
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_returns_true)
|
||||
{
|
||||
unsigned int libconsensus_flags = 0;
|
||||
int nIn = 0;
|
||||
|
||||
CScript scriptPubKey;
|
||||
CScript scriptSig;
|
||||
CScriptWitness wit;
|
||||
|
||||
scriptPubKey << OP_1;
|
||||
CTransaction creditTx = BuildCreditingTransaction(scriptPubKey, 1);
|
||||
CTransaction spendTx = BuildSpendingTransaction(scriptSig, wit, creditTx);
|
||||
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << spendTx;
|
||||
|
||||
bitcoinconsensus_error err;
|
||||
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
|
||||
BOOST_CHECK_EQUAL(result, 1);
|
||||
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_OK);
|
||||
}
|
||||
|
||||
/* Test bitcoinconsensus_verify_script returns invalid tx index err*/
|
||||
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_tx_index_err)
|
||||
{
|
||||
unsigned int libconsensus_flags = 0;
|
||||
int nIn = 3;
|
||||
|
||||
CScript scriptPubKey;
|
||||
CScript scriptSig;
|
||||
CScriptWitness wit;
|
||||
|
||||
scriptPubKey << OP_EQUAL;
|
||||
CTransaction creditTx = BuildCreditingTransaction(scriptPubKey, 1);
|
||||
CTransaction spendTx = BuildSpendingTransaction(scriptSig, wit, creditTx);
|
||||
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << spendTx;
|
||||
|
||||
bitcoinconsensus_error err;
|
||||
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
|
||||
BOOST_CHECK_EQUAL(result, 0);
|
||||
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_TX_INDEX);
|
||||
}
|
||||
|
||||
/* Test bitcoinconsensus_verify_script returns tx size mismatch err*/
|
||||
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_tx_size)
|
||||
{
|
||||
unsigned int libconsensus_flags = 0;
|
||||
int nIn = 0;
|
||||
|
||||
CScript scriptPubKey;
|
||||
CScript scriptSig;
|
||||
CScriptWitness wit;
|
||||
|
||||
scriptPubKey << OP_EQUAL;
|
||||
CTransaction creditTx = BuildCreditingTransaction(scriptPubKey, 1);
|
||||
CTransaction spendTx = BuildSpendingTransaction(scriptSig, wit, creditTx);
|
||||
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << spendTx;
|
||||
|
||||
bitcoinconsensus_error err;
|
||||
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size() * 2, nIn, libconsensus_flags, &err);
|
||||
BOOST_CHECK_EQUAL(result, 0);
|
||||
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH);
|
||||
}
|
||||
|
||||
/* Test bitcoinconsensus_verify_script returns invalid tx serialization error */
|
||||
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_tx_serialization)
|
||||
{
|
||||
unsigned int libconsensus_flags = 0;
|
||||
int nIn = 0;
|
||||
|
||||
CScript scriptPubKey;
|
||||
CScript scriptSig;
|
||||
CScriptWitness wit;
|
||||
|
||||
scriptPubKey << OP_EQUAL;
|
||||
CTransaction creditTx = BuildCreditingTransaction(scriptPubKey, 1);
|
||||
CTransaction spendTx = BuildSpendingTransaction(scriptSig, wit, creditTx);
|
||||
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << 0xffffffff;
|
||||
|
||||
bitcoinconsensus_error err;
|
||||
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
|
||||
BOOST_CHECK_EQUAL(result, 0);
|
||||
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_TX_DESERIALIZE);
|
||||
}
|
||||
|
||||
/* Test bitcoinconsensus_verify_script returns amount required error */
|
||||
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_amount_required_err)
|
||||
{
|
||||
unsigned int libconsensus_flags = bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS;
|
||||
int nIn = 0;
|
||||
|
||||
CScript scriptPubKey;
|
||||
CScript scriptSig;
|
||||
CScriptWitness wit;
|
||||
|
||||
scriptPubKey << OP_EQUAL;
|
||||
CTransaction creditTx = BuildCreditingTransaction(scriptPubKey, 1);
|
||||
CTransaction spendTx = BuildSpendingTransaction(scriptSig, wit, creditTx);
|
||||
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << spendTx;
|
||||
|
||||
bitcoinconsensus_error err;
|
||||
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
|
||||
BOOST_CHECK_EQUAL(result, 0);
|
||||
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_AMOUNT_REQUIRED);
|
||||
}
|
||||
|
||||
/* Test bitcoinconsensus_verify_script returns invalid flags err */
|
||||
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_invalid_flags)
|
||||
{
|
||||
unsigned int libconsensus_flags = 1 << 3;
|
||||
int nIn = 0;
|
||||
|
||||
CScript scriptPubKey;
|
||||
CScript scriptSig;
|
||||
CScriptWitness wit;
|
||||
|
||||
scriptPubKey << OP_EQUAL;
|
||||
CTransaction creditTx = BuildCreditingTransaction(scriptPubKey, 1);
|
||||
CTransaction spendTx = BuildSpendingTransaction(scriptSig, wit, creditTx);
|
||||
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << spendTx;
|
||||
|
||||
bitcoinconsensus_error err;
|
||||
int result = bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), nIn, libconsensus_flags, &err);
|
||||
BOOST_CHECK_EQUAL(result, 0);
|
||||
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_INVALID_FLAGS);
|
||||
}
|
||||
|
||||
#endif
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
@@ -3032,7 +3032,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
|
||||
|
||||
// Check transactions
|
||||
for (const auto& tx : block.vtx)
|
||||
if (!CheckTransaction(*tx, state, false))
|
||||
if (!CheckTransaction(*tx, state, true))
|
||||
return state.Invalid(false, state.GetRejectCode(), state.GetRejectReason(),
|
||||
strprintf("Transaction check failed (tx hash %s) %s", tx->GetHash().ToString(), state.GetDebugMessage()));
|
||||
|
||||
|
||||
@@ -95,7 +95,18 @@ class InvalidBlockRequestTest(ComparisonTestFramework):
|
||||
assert(block2_orig.vtx != block2.vtx)
|
||||
|
||||
self.tip = block2.sha256
|
||||
yield TestInstance([[block2, RejectResult(16, b'bad-txns-duplicate')], [block2_orig, True]])
|
||||
yield TestInstance([[block2, RejectResult(16, b'bad-txns-duplicate')]])
|
||||
|
||||
# Check transactions for duplicate inputs
|
||||
self.log.info("Test duplicate input block.")
|
||||
|
||||
block2_dup = copy.deepcopy(block2_orig)
|
||||
block2_dup.vtx[2].vin.append(block2_dup.vtx[2].vin[0])
|
||||
block2_dup.vtx[2].rehash()
|
||||
block2_dup.hashMerkleRoot = block2_dup.calc_merkle_root()
|
||||
block2_dup.rehash()
|
||||
block2_dup.solve()
|
||||
yield TestInstance([[block2_dup, RejectResult(16, b'bad-txns-inputs-duplicate')], [block2_orig, True]])
|
||||
height += 1
|
||||
|
||||
'''
|
||||
|
||||
@@ -98,6 +98,57 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
# Test `createrawtransaction` invalid `replaceable`
|
||||
assert_raises_rpc_error(-3, "Expected type bool", self.nodes[0].createrawtransaction, [], {}, 0, 'foo')
|
||||
|
||||
for type in ["bech32", "p2sh-segwit", "legacy"]:
|
||||
addr = self.nodes[0].getnewaddress("", type)
|
||||
addrinfo = self.nodes[0].validateaddress(addr)
|
||||
pubkey = addrinfo["scriptPubKey"]
|
||||
|
||||
self.log.info('sendrawtransaction with missing prevtx info (%s)' %(type))
|
||||
|
||||
# Test `signrawtransaction` invalid `prevtxs`
|
||||
inputs = [ {'txid' : txid, 'vout' : 3, 'sequence' : 1000}]
|
||||
outputs = { self.nodes[0].getnewaddress() : 1 }
|
||||
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
|
||||
|
||||
prevtx = dict(txid=txid, scriptPubKey=pubkey, vout=3, amount=1)
|
||||
succ = self.nodes[0].signrawtransaction(rawtx, [prevtx])
|
||||
assert succ["complete"]
|
||||
if type == "legacy":
|
||||
del prevtx["amount"]
|
||||
succ = self.nodes[0].signrawtransaction(rawtx, [prevtx])
|
||||
assert succ["complete"]
|
||||
|
||||
if type != "legacy":
|
||||
assert_raises_rpc_error(-3, "Missing amount", self.nodes[0].signrawtransaction, rawtx, [
|
||||
{
|
||||
"txid": txid,
|
||||
"scriptPubKey": pubkey,
|
||||
"vout": 3,
|
||||
}
|
||||
])
|
||||
|
||||
assert_raises_rpc_error(-3, "Missing vout", self.nodes[0].signrawtransaction, rawtx, [
|
||||
{
|
||||
"txid": txid,
|
||||
"scriptPubKey": pubkey,
|
||||
"amount": 1,
|
||||
}
|
||||
])
|
||||
assert_raises_rpc_error(-3, "Missing txid", self.nodes[0].signrawtransaction, rawtx, [
|
||||
{
|
||||
"scriptPubKey": pubkey,
|
||||
"vout": 3,
|
||||
"amount": 1,
|
||||
}
|
||||
])
|
||||
assert_raises_rpc_error(-3, "Missing scriptPubKey", self.nodes[0].signrawtransaction, rawtx, [
|
||||
{
|
||||
"txid": txid,
|
||||
"vout": 3,
|
||||
"amount": 1
|
||||
}
|
||||
])
|
||||
|
||||
#########################################
|
||||
# sendrawtransaction with missing input #
|
||||
#########################################
|
||||
|
||||
Reference in New Issue
Block a user