upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f84f209..382a008 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1513,7 +1513,7 @@ int CMerkleTx::GetBlocksToMaturity() const
1513{ 1513{
1514 if (!IsCoinBase()) 1514 if (!IsCoinBase())
1515 return 0; 1515 return 0;
1516 return max(0, (COINBASE_MATURITY+20) - GetDepthInMainChain()); 1516 return max(0, COINBASE_SPENDABLE_DEPTH - GetDepthInMainChain());
1517} 1517}
1518 1518
1519 1519
@@ -4812,7 +4812,18 @@ bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew)
4812 { 4812 {
4813 string strError; 4813 string strError;
4814 if (nValue + nFeeRequired > GetBalance()) 4814 if (nValue + nFeeRequired > GetBalance())
4815 strError = strprintf("Error: This is an oversized transaction that requires a transaction fee of %s ", FormatMoney(nFeeRequired).c_str()); 4815 // Not an oversized transaction -- this branch is simply "the
4816 // spendable balance is too small". Saying otherwise (with a fee
4817 // of 0.00, because CreateTransaction failed before setting one)
4818 // sends anyone reading the log after a failed payout hunting a
4819 // transaction-size problem that does not exist.
4820 strError = strprintf("Error: insufficient spendable balance:"
4821 " need %s (plus fee %s) but only %s is spendable"
4822 " -- mined coin counts as zero until it is %d deep",
4823 FormatMoney(nValue).c_str(),
4824 FormatMoney(nFeeRequired).c_str(),
4825 FormatMoney(GetBalance()).c_str(),
4826 COINBASE_SPENDABLE_DEPTH);
4816 else 4827 else
4817 strError = "Error: Transaction creation failed "; 4828 strError = "Error: Transaction creation failed ";
4818 return error("SendMoney() : %s\n", strError.c_str()); 4829 return error("SendMoney() : %s\n", strError.c_str());