Pierre K
Pierre K
"Jean-Jacquesrousseau" -> "Jean-Jacques Rousseau" : http://tile.openstreetmap.fr/~cquest/leaflet/bano.html#20/45.19128/5.72919
So, when a transaction has an unsigned input, the serialized script is `41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000000000` It looks like garbage indeed.
The code is confusing, because of all the branching. It seems that unsigned transactions get through an "estimate_size" branch, in which a blank pubkey ("210000...") and a blank Schnorr signature...
This could be the issue: https://github.com/Bitcoin-ABC/ElectrumABC/blob/master/electroncash/transaction.py#L673 There is additional (non standard) data added to each input when unsigned transactions are generated. So my initial assessment was wrong, it is not...
Confirmed: if I comment out that block, the hex is a proper unsigned tx that can be decoded by the node. But it has a bunch of side effects, like...
It also provides a solution for issue #13: >>> from cashaddress.convert import Address >>> regtest_cashaddr = Address.from_string( ... "bitcoincash:qr4pqy6q4cy2d50zpaek57nnrja7289fkskz6jm7yf" ... ).cash_address(prefix='regtest') >>> print(regtest_cashaddr) regtest:qr4pqy6q4cy2d50zpaek57nnrja7289fksjm6es9se >>>
I need to sort out the issue with case.
Thanks. Could you give an example of an address format that was incorrectly decoded before these changes?
The new prefix will be announced very soon as part of the rebranding, btw.
I was thinking of adding : ABC_MAINNET_PREFIX, ABC_TESTNET_PREFIX, Address.abc_cash_address, to_abc_cash_addr And make Address.from_string, to_legacy_addr, to_cash_addr all support the 3 type of addresses as input (default to "bitcoincash:" if the prefix...