hexresearch / hschain

Other
4 stars 0 forks source link

Mempool #657

Closed Shimuuar closed 4 years ago

Shimuuar commented 4 years ago
  1. Working with database is split into separate package hschain-db for reuse in hschain-PoW. Connection is no longer carries caches and type varibale of block data. Request caching which is specific for the hschain is moved to the separate monad.

  2. State in PoS blockchain is now managed using idea from hschain-PoW: StateView. It is somewhat simpler because no block rollbacks. There's simple im-memory implementation and one for mock coin which stores state in the database.

  3. Cleaned up mempool implementation for PoS. Mempool now run in separate thread so there's no delay due to filtering.

thesz commented 4 years ago

I am inclined to approve that PR as a whole. It can be a base for further work and in general I like it.