'sendfrom' used incorrect account name one time #909

Closed
dooglus opened this Issue Feb 28, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

dooglus commented Feb 28, 2012

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$$//')

Owner

laanwj commented Nov 4, 2013

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

laanwj closed this Nov 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment