0

I have two testnet nodes set up at home. I'm testing sending between them, all communication is working just fine!

I just tried to send 0.0003 from A->B

This is my tx: https://live.blockcypher.com/btc-testnet/tx/dc7a9ba7e01efe04ae6b757d1832d4287b95105f6a1e88eb314a926919d1c32b/

I used sendtoaddress and set the receiver to charge the fees. (5th argument set to true) I'd created a new address: 2N8yYvrbAxKm9nhS8fDCZng1GRVwvxhUy8n on Server B seconds before using that new address to send from A->B

How can I find out more about why I was charged 0.01010081 BTC to 2N3HvqWY8sQ59mqHDXeWAd6tV8LWR7pmNnY I assume this is the wallet of the node that validated the transaction?

I'm using jsonRPC and here is my call:

sendtoaddress( '2N8yYvrbAxKm9nhS8fDCZng1GRVwvxhUy8n', '0.0003', 'test from local to MT', 'Message for MT to see?', true )

rawtransactions confuse me I'll be honest. I'm assuming that I need to get over that, but before I do, why was I charged a fee many 100% higher than my transaction?

Cheers!

Beertastic
  • 691
  • 1
  • 9
  • 27

1 Answers1

0

The output to 2N3HvqWY8sQ59mqHDXeWAd6tV8LWR7pmNnY is your change.

Bitcoin tracks money in a way similar to physical cash. Your balance is composed of many individual outputs, each of a specific value, similar to how your physical wallet balance is composed of many individual notes, each of a specific value (for example, someone with $25 in their wallet might have $20 + $5 in notes).

When you spend Bitcoin, you must consume an existing output in full. As it is uncommon for someone to have outputs that sum up precisely to their desired send amount + fees, any left over value from the outputs used by the transactions are returned to an address in your sending wallet as change.

Raghav Sood
  • 81,899
  • 22
  • 187
  • 195