1

I want to lock a UTXO for 90 days.

My Binary is:

00000000010000000011101101010011

And my sequence is: 533B40

When I decode the witness script with bitcoin-cli decodescript I can see 4209491. Where 4209491 comes from?

UPDATE

It's seems that the 533B40 convert into little endian and the convert into base 10

printf 533B40 | tac -rs .. 
403B53

Then convert in base 2

echo "ibase=16; obase=2; 403B53" | bc
10000000011101101010011

And then in base10

echo "ibase=2;10000000011101101010011" | bc
4209491

why decodescript has this behaviour?

2

decodescript has this behavior because integers in Bitcoin are little endian. So decodescript is telling you what number the script interpreter would use when it processes your script.

| improve this answer | |

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.