pybitcash / bitcash

BitCash: Python Bitcoin Cash Library (fork of ofek's Bit)
https://bitcash.dev
MIT License
97 stars 39 forks source link

Chain verification missing #133

Open yashasvi-ranawat opened 9 months ago

yashasvi-ranawat commented 9 months ago

A wallet does not check that the chain (mainnet, testnet or regtest) the output addresses are on matches the one the wallet is on, before sending a transaction.

merc1er commented 9 months ago

Does this result in the transaction being rejected by the network?

yashasvi-ranawat commented 8 months ago

yes! if you intend to spend a tx on testnet, but accidentally use a mainnet wallet, it won't find the utxos; or worse, send real BCH to a wallet with locking script same as the testnet address.

I saw the Bit repo, it does have a check for such case.