parity-bitcoin
parity-bitcoin copied to clipboard
possible improvements, mempool transactions are hashed twice
first hashing occurs during verification:
https://github.com/ethcore/parity-bitcoin/blob/591a6421216097eb60b3eb5c1ca9b455c2275deb/verification/src/chain_verifier.rs#L97
second one during insertion to mempool:
https://github.com/ethcore/parity-bitcoin/blob/591a6421216097eb60b3eb5c1ca9b455c2275deb/miner/src/memory_pool.rs#L678
imo, it would be good not to use chain::Transaction at all. As soon as we deserialize transaction, we could transform it into IndexedTransaction