Error when trying to send very precise amount #18

issue davout opened this issue on January 2, 2011
  1. davout commented at 11:40 PM on January 2, 2011: none

    I generated block 100283 and collected a sub bitcent transaction fee. I get an "Insufficient funds" error when trying to send my exact balance to another address. It seems that there is either :

    • wrong behaviour (should send the amount), or
    • wrong error message, (the balance is ok but the client forbids me to send it)

    Block : 000000000003d014210dcffd602715545bce976f0f257d99279c83c2778e7150

    Here's the trace

    <pre>david@box:~$ bitcoin getinfo { "version" : 31900, "balance" : 50.00638641, "blocks" : 100760, "connections" : 48, "proxy" : "", "generate" : true, "genproclimit" : -1, "difficulty" : 14484.16236123, "hashespersec" : 9273499, "testnet" : false, "keypoololdest" : 1291071649, "paytxfee" : 0.00000000, "errors" : "" } david@box:~$ bitcoin sendtoaddress 12DidCRRT9fqmSBReRNN8KjCktYGTVU1Jj 50.00638641 error: {"code":-4,"message":"Insufficient funds"}</pre>

  2. davout commented at 11:43 PM on January 2, 2011: none

    Wow, I just sent 50 BTC, and now the client is reporting zero balance...

  3. gavinandresen commented at 5:37 PM on January 3, 2011: contributor

    What happened:

    Send 50.006... was rounded to 50.01 (amounts get rounded to two decimals). Causing insufficient funds message.

    Send 50 ran into special-case code for micropayments; if making change would result in less than 0.01 coins (which would trigger the you-must-pay-a-0.01-fee transaction spam prevention code), then the sub-cent amount is sent along as a transaction fee.

    At the very least, the RPC code should put the amount being sent in the insufficient funds message.

    Doing something more with sub-cent transactions needs more careful thought...

  4. tcatm closed this on Mar 22, 2011

  5. namecoin-qt referenced this in commit 0668d15b5f on Jun 13, 2013
  6. justmoon referenced this in commit e49a21dcaf on Apr 7, 2014
  7. rebroad referenced this in commit b5ab15d275 on Jul 21, 2014
  8. rdponticelli referenced this in commit 728554dfae on Nov 26, 2014
  9. rubensayshi referenced this in commit 49bbbedf6e on Mar 16, 2015
  10. destenson referenced this in commit 00655a2075 on Jun 26, 2016
  11. braydonf referenced this in commit 956b424292 on Jun 28, 2016
  12. jameshilliard referenced this in commit 50b7fa8dcd on Jun 14, 2017
  13. classesjack referenced this in commit 4a36d31303 on Jan 2, 2018
  14. CryptAxe referenced this in commit 8fd777b8eb on Mar 11, 2018
  15. KrzysiekJ referenced this in commit 3d485e491d on Mar 28, 2018
  16. effectsToCause referenced this in commit 9c64568f14 on Jun 22, 2018
  17. MarcoFalke referenced this in commit 4f2e6c8b88 on Jan 26, 2019
  18. DigiGreenCoin referenced this in commit c8b9ae7c44 on Oct 29, 2019
  19. laanwj referenced this in commit b586bbd558 on Nov 6, 2019
  20. laanwj referenced this in commit 97b66d34eb on Nov 7, 2019
  21. laanwj referenced this in commit e9c85bb139 on Nov 7, 2019
  22. laanwj referenced this in commit c92f7af618 on Nov 7, 2019
  23. laanwj referenced this in commit 656712fe94 on Dec 9, 2019
  24. laanwj referenced this in commit 4abd92d5c4 on Dec 12, 2019
  25. Warchant referenced this in commit 7958da26e8 on Dec 31, 2019
  26. laanwj referenced this in commit 89c8fe5189 on Jan 2, 2020
  27. laanwj referenced this in commit 66480821b3 on Jan 28, 2020
  28. Losangelosgenetics referenced this in commit 94f1d8fc76 on Mar 12, 2020
  29. Losangelosgenetics referenced this in commit 804d25ac88 on Mar 12, 2020
  30. phm87 referenced this in commit 70d7dc2b94 on Jun 16, 2020
  31. KolbyML referenced this in commit 2083327f81 on Aug 1, 2020
  32. KolbyML referenced this in commit 473f9caedb on Aug 1, 2020
  33. laanwj referenced this in commit 924a4ff7eb on Oct 29, 2020
  34. jonasschnelli referenced this in commit 616eace02a on Jan 11, 2021
  35. rajarshimaitra referenced this in commit 5ed9174b67 on Mar 23, 2021
  36. rajarshimaitra referenced this in commit 3b7d5d04a1 on Mar 23, 2021
  37. MarcoFalke referenced this in commit bce09da122 on Apr 28, 2021
  38. MarcoFalke referenced this in commit eb9a1fe037 on May 7, 2021
  39. MarcoFalke referenced this in commit c857148636 on May 15, 2021
  40. rajarshimaitra referenced this in commit bb065e2f01 on Aug 5, 2021
  41. DrahtBot locked this on Sep 8, 2021
Labels
Linked (view graph)
#737 Deadlock during startup (Appears to be AddAddress / DNSSeed related)#982 Startup blocks on mutex at "Loading Addresses"#999 v0.6.0rc5 segfault on initial blockchain download when out of diskspace#1098 segfault in qrcode message dialog#2472 System error: database corrupted: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed#5698 Code vulnerable to segfault after a network fork#5795 Bizarre test_bitcoin crash, but passes in debugger#6332 Segmentation fault on bitcoind or bitcoin-qt startup (64bit Linux)#6540 scheduler_tests (currently disabled) occasionally deadlocks#8984 GUI hangs during sync#9348 Node crashed with assertion failure in network code#9687 bitcoin-qt crashed in FinalizeNode()#9759 Setting -maxsigcachesize to zero causes segfault#9883 [Qt] Segfault on startup#9997 Running out of disk space during GUI init results in hang and non-drawing windows#10209 Stalled shutdown#10293 SEGV in segwit fundrawtransaction#10861 Segfault on shutdown after pressing 'q' to postpone utxo db upgrade#11355 LevelDB read failure: Corruption: block checksum mismatch#11763 deadlock on shutdown#12038 deadlock on database corruption#12279 shutdown took 8 minutes in v0.15.0.1#12687 Remove unused -testsafemode [AKA: why this PR is wrong]#13316 make check fails for configure option --with-incompatible-bdb and Berkeley DB 5.3#14330 [tests] segfault during`DEBUG=1` run of existing_data_no_obfuscate locally#14349 mac: make check failure on macOS 10.14#14923 segmentation fault on gui startup#15227 bitcoind terminated with uncaught exception if configure --debug-enabled#15310 gui: crash if encrypt / change passphrase window is open and wallet is unloaded#15379 bitcoind crashes after exception in scheduler thread#17540 ci build fails in ./qt/test/test_bitcoin-qt on aarch64 native tsan#18362 gui: segfault unloading and immediately reloading wallet with gui#19024 UB: double lock of mutex in init.cpp#19448 qa: Data race detected when running `mempool_expiry.py`#20163 TSAN race after merge of #20090#20242 fuzz: Properly initialize PrecomputedTransactionData#20334 ci: fuzz/decode_tx fails#20542 Unexpected test fail: wallet/wallet.cpp:3113:51: runtime error: division by zero#20618 Data race in interface_zmq.py#21466 Avoid use of "socket" syscall when formatting IP addresses in CNetAddr::ToString#21632 MemorySanitizer: use-of-uninitialized-value in sqlite3BtreeOpen#21773 fuzz: Ensure prevout is consensus-valid#21802 refactor: Avoid UB in util/asmap (advance a dereferenceable iterator outside its valid range)#21948 test: Fix off-by-one in mockscheduler test RPC#22548 CheckQueue_Correct_Random data race#23321 bitcoind segfault's while loading tr descriptor on regtest v22.0#24290 segfault when compiled with depends DEBUG=1 and libc++#24426 test: Fix intermittent Tsan issue#25077 Fix chain tip data race and corrupt rest response#25146 Starting with an unsupported wallet configured leads to a segfault (master only?)#25323 miniscript fuzzer failing after qa-assets update#25365 ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) in BaseIndex#25632 SUMMARY: ThreadSanitizer: SEGV src/index/base.cpp:388:9 in BaseIndex::SetBestBlockIndex(CBlockIndex const*)::$_1::operator()() const#25857 IBD core dumped during recursive call to CCoinsViewCache::FetchCoin (while connecting best chain tip)#26068 Segmentation fault in the scheduler thread when an index fails to commit to the db#26274 bitcoind dumps core when deriveaddresses is called with index 2147483647 (2^31-1)#26477 validation: fix broken maxtipage comparison#27222 test: use-of-uninitialized-value in sqlite3Strlen30#27354 wallet: Data race in GetOrCreateLegacyScriptPubKeyMan vs IsMine#27355 index: ThreadSanitizer: data race on vptr #27360 ci: use LLVM/clang-16 in native_asan job#27582 TSAN: lock-order-inversion (potential deadlock) in ZapSelectTx test#27922 ci: fix llvm-symbolizer in MSAN jobs#28510 migratewallet crashes on an freshly created datadir ( wallet/wallet.h:959: int wallet::CWallet::GetLastBlockHeight() const: Assertion `m_last_block_processed_height >= 0' failed.)#28665 'std::out_of_range' crash in I2P fuzz test#28917 fuzz, parse_iso8601: attempt to dereference an end-of-stream istreambuf_iterator#28969 fuzz: Avoid signed-integer-overflow in wallet_notifications fuzz target#29153 new crash in v26.0#29178 ubsan: misaligned-pointer-use in crc32c/src/crc32c_arm64.cc#29767 ThreadSanitizer: data race src/flatfile.cpp:47:13 in FlatFileSeq::Open(FlatFilePos const&, bool)#29908 test: SegFault in `ismine_tests` on SunOS / illumos#30284 Mini miner `AncestorFeerateComparator` Signed Integer Overflow#30402 Illegal Instruction in `CoinStatsIndex::CustomAppend`#31234 fuzz: connman target: terminate called after throwing an instance of 'std::bad_alloc'#32173 validation: `CheckBlockIndex` crashes during block reconsideration#32780 lsan: add more Qt suppressions#32957 SegFault in QSortFilterProxyModelPrivate::build_source_to_proxy_mapping#33150 intermittent TSAN failure in lockmanager_tests::blockmanager_readblock_hash_mismatch#33277 intermittent Segmentation fault in mptest IPC path (callFnAsyncParams)#34014 mptest hangs, when run in a loop#34110 scriptpubkeyman fuzz target creates Base58 too large; Fails on 32-bit (armhf, ...)#34645 oss-fuzz: coins_view_overlay: ASSERT: m_dirty_count == 0#34655 fuzz: keep `coins_view` fuzzers within caller contracts#34732 i386 segv in #0 0xf7a49ce0 in kj::operator*(kj::_::Stringifier, kj::Exception const&) (/lib/i386-linux-gnu/libkj-1.1.0.so+0x38ce0)#34734 test: Fix shutdown vptr race in BlockFilterIndexSync bench#34777 ipc: AddressSanitizer: heap-use-after-free in `capnp::CallContext<ipc::capnp::messages::BlockTemplate::GetBlockParams, ipc::capnp::messages::BlockTemplate::GetBlockResults>::getParams()`#34782 mptest: mp::CancelMonitor: AddressSanitizer: stack-use-after-return

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me