pybitcash/bitcash

Chain verification missing

Opened this issue · 2 comments

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.

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

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.