diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 9f39a032dc..42852c01d5 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -2388,6 +2388,21 @@ Value repairwallet(const Array& params, bool fHelp) return result; } +// NovaCoin: resend unconfirmed wallet transactions +Value resendtx(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "resendtx\n" + "Re-send unconfirmed transactions.\n" + ); + + ResendWalletTransactions(); + + return Value::null; +} + + // ppcoin: make a public-private key pair Value makekeypair(const Array& params, bool fHelp) { @@ -2549,6 +2564,7 @@ static const CRPCCommand vRPCCommands[] = { "reservebalance", &reservebalance, false}, { "checkwallet", &checkwallet, false}, { "repairwallet", &repairwallet, false}, + { "resendtx", &resendtx, false}, { "makekeypair", &makekeypair, false}, { "sendalert", &sendalert, false}, }; diff --git a/src/main.cpp b/src/main.cpp index 63e326e396..c27b8c2041 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -165,7 +165,7 @@ void static Inventory(const uint256& hash) } // ask wallets to resend their transactions -void static ResendWalletTransactions() +void ResendWalletTransactions() { BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) pwallet->ResendWalletTransactions(); diff --git a/src/main.h b/src/main.h index 56ce0e4c11..781f54a3c0 100644 --- a/src/main.h +++ b/src/main.h @@ -124,10 +124,7 @@ std::string GetWarnings(std::string strFor); uint256 WantedByOrphan(const CBlock* pblockOrphan); const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake); void BitcoinMiner(CWallet *pwallet, bool fProofOfStake); - - - - +void ResendWalletTransactions();