'sendfrom' used incorrect account name one time #909

issue dooglus opened this issue on February 28, 2012
  1. dooglus commented at 11:57 AM on February 28, 2012: contributor

    Every day or two I run a script to move bitcoins between local and remote wallets. The script hasn't been changed since 16th Feb, but one time when I ran it a few days ago it sent coins from the "" account, not the one I told it to.

    The script runs: bitcoind sendfrom name $address $amount

    which should debit the "name" account. And every time except for one that's what it did. Now, however, if I check the balance of the "name" account, it is too high by the amount I transferred the time it went wrong, and if I "listtransactions" the transaction in question has: . "account" : "", instead of . "account" : "name",

    I don't know how to get this to happen again - it's been fine for 6 months, only going wrong this one time. It has been working again since the time it went wrong.

    I doubt it matters, but this is the script I use. It's in a Makefile, so most of the $'s are doubled up:

    move: @x=$$($(BITCOIND) getbalance name 0) || exit;
    echo $$x | sed -E 's/[.]?00000000$$//';
    echo -n "amount: "; read Y; Y0=$$Y"00000000";
    echo "send $$Y BTC to $(ADDRESS)?";
    echo -n "wallet passphrase: "; read X; echo;
    $(BITCOIND) walletpassphrase "$$X" 300 &&
    ($(BITCOIND) sendfrom name $(ADDRESS) $$Y;
    $(BITCOIND) walletlock;
    ssh server "echo "$$(date) - received $$Y BTC at $(ADDRESS)" >> wallet.log";
    $(BITCOIND) getbalance name 0 |
    sed 's/00000000$$//')

  2. laanwj commented at 2:47 PM on November 4, 2013: member

    Closing this, as it is a one-time issue that was never reproduced for two years.

  3. laanwj closed this on Nov 4, 2013

  4. suprnurd referenced this in commit 8cdf85323b on Dec 5, 2017
  5. ptschip referenced this in commit f4e5927351 on Jan 19, 2018
  6. lateminer referenced this in commit 458b08c8f2 on Oct 30, 2019
  7. DrahtBot locked this on Sep 8, 2021
Contributors

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-16 00:15 UTC

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