kyokan / bob-wallet

Bob Wallet is a GUI for DNS Record Management and Name Auctions on Handshake. It includes an integrated full node: hsd
https://www.bobwallet.io/
GNU General Public License v3.0
380 stars 92 forks source link

send tries to double spend coins #618

Open rithvikvibhu opened 1 year ago

rithvikvibhu commented 1 year ago

Not sure how, but it seems when sending multiple sends from a wallet with limited (1) coins, the same coin is used to create subsequent sends and they get rejected by peers.

Tried reproducing in hsd, but could not (the second send used the first send's change):

# single fund
hsdgen 1
hsw-cli balance # 2000

# mine another to random address (not ours) for coinbase maturity
hsd-cli rpc generatetoaddress 1 $ADDR

# send twice to random addresses
hsw-cli send --value 15 --address $ADDR
hsw-cli send --value 25 --address $ADDR

# both are valid, can confirm by inspecting txs
hsd-cli mempool

Another side effect is pending txs (even successful ones) don't show up in the list. Could be related.

Bob v2.0.0 / hsd v5.0.1