aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-03-27 10:34:48 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-04-01 13:03:39 +0200
commit6f252627b2843ff5072cb702b47e241f4ffbed92 (patch)
treea9898b0f2db439fadd759f5b3b3b99456128f49d /src/init.cpp
parent41113e33ad62333d99fd8cc6bf717c0794681d86 (diff)
downloadbitcoin-6f252627b2843ff5072cb702b47e241f4ffbed92.tar.xz
wallet: make it possible to disable transaction broadcast
This is an advanced feature which will disable any kind of automatic transaction broadcasting in the wallet. This gives the user full control of how the transaction is sent. For example they can broadcast new transactions through some other mechanism themselves, after getting the transaction hex through `gettransaction`. This just adds the option `-walletbroadcast=<0,1>`. Right now these transactions will get the status Status: conflicted, has not been successfully broadcast yet They shouldn't be shown as conflicted at all (`walletconflicts` is empty). This status will go away when the transaction is received through the network.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 2a13af6690..9445e2fa10 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -337,6 +337,7 @@ std::string HelpMessage(HelpMessageMode mode)
FormatMoney(maxTxFee)));
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat"));
+ strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), true));
strUsage += HelpMessageOpt("-walletnotify=<cmd>", _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)"));
strUsage += HelpMessageOpt("-zapwallettxes=<mode>", _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") +
" " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"));
@@ -1242,6 +1243,7 @@ bool AppInit2(boost::thread_group& threadGroup)
}
}
}
+ pwalletMain->SetBroadcastTransactions(GetBoolArg("-walletbroadcast", true));
} // (!fDisableWallet)
#else // ENABLE_WALLET
LogPrintf("No wallet compiled in!\n");