1

I'm dorking around with creating a TEST transaction using libbitcoin's bx command. Besides setting the inputs and outputs, the bx tx-encode sub-command allows one to specify lock_time and version. Any idea where one can look to find details about what the current version is for BTC and TEST transactions?

1

You should use TX_VERSION = 1 and TX_LOCK = 0xFFFFFFFF for mainnet and testnet

3
-1

% bx fetch-header -t 365307 -c bx-mainnet.cfg
header { bits 404063944
hash 00000000000000000eecb8c5dabfede194627d53fddfdb685103e5317a7e175e merkle_tree_hash 8b787ac50ec4e7d3890a917ff196938972f940304badd4f3ebb3c1a480d6eeeb nonce 3395429232
previous_block_hash 00000000000000000641fa532675b3e4fcf879cb5e4358895fa7b87e883b13d9
time_stamp 1436897984
version 3 }

% bx fetch-header -t 503223 -c bx-testnet.cfg
header { bits 486604799
hash 0000000001eee9c08d12c48f11414c45379e2e7b1b5b5318b012ba0e677609f1 merkle_tree_hash bb6dc83519a3246adca03a4eeb4d2a7c326693f8c1ed28b6e13824e90ecbde8a nonce 561008572
previous_block_hash 00000000000266ea01bc19141dffa2230e9897259d9ddc058cf41d97328477cb time_stamp 1436904967
version 3 }

2
  • 1
    This is about block versions (which are at 3, since BIP66 took effect). The question was about transaction versions (which have been at 1 since Bitcoin's creation). – Pieter Wuille Jul 14 '15 at 19:16
  • Thanks for clearing up the confusion between Block Versions and Transaction Versions. – skaht Jul 17 '15 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.