Skip to content

Commit

Permalink
Add resendtx RPC call
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Feb 21, 2013
1 parent 0ea0288 commit 9b98faa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
16 changes: 16 additions & 0 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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},
};
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();



Expand Down

0 comments on commit 9b98faa

Please sign in to comment.