aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2016-01-01 23:18:34 -0600
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-22 15:43:01 +0200
commit4f7ff00497803fddc5a0fb5340502a73e395134d (patch)
tree9b457d5396f5972e70bdafef67775462ef954f7c /src/wallet
parent66cca79130a204277e61088b7844b405dc3868a5 (diff)
[qa] Add rpc test for segwit
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9 based switchover logic. Fixes and py3 conversion by Marco Falke.
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index afbb9a1113..8538f880ff 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -1072,7 +1072,7 @@ UniValue addwitnessaddress(const UniValue& params, bool fHelp)
{
LOCK(cs_main);
- if (!IsWitnessEnabled(chainActive.Tip(), Params().GetConsensus())) {
+ if (!IsWitnessEnabled(chainActive.Tip(), Params().GetConsensus()) && !GetBoolArg("-walletprematurewitness", false)) {
throw JSONRPCError(RPC_WALLET_ERROR, "Segregated witness not enabled on network");
}
}