lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.57k stars 178 forks source link

Should create function for claim processing code in main.cpp #151

Closed kaykurokawa closed 5 years ago

kaykurokawa commented 6 years ago

Claim processing code that goes in main.cpp's ConnectBlock() and DisconnectBlock() should be refactored into functions.

https://github.com/lbryio/lbrycrd/blob/v0.12.2.0/src/main.cpp#L2588

https://github.com/lbryio/lbrycrd/blob/v0.12.2.0/src/main.cpp#L2160

This should remove code duplication in miner.cpp : https://github.com/lbryio/lbrycrd/blob/v0.12.2.0/src/miner.cpp#L320

And also allow us to write unit tests for transaction parsing on claim commands and achieve better seperation between Bitcoin Core code and claimtrie code.

bvbfan commented 6 years ago

222

BrannonKing commented 5 years ago

merged