-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use structured transaction in store and mempool
Both the block store and mempool types were still using opaque transctions (`[]byte`) from the early version of the p2p demo. This updates both to use `*types.Transaction`. This change stops short of updating the `Block` type to have a `Txns []*Transaction` field instead of `Txns [][]byte`, but that change should also be made. This can wait until the block data / chain RPCs are complete. It will also require updating the block serialization code, although the effective binary serialization will be identical. This also updates the mempool implementation and interface: - internally there is a FIFO queue so that `PeekN` will return those at the front of the queue. The maps still remain there for fast indexing and existence checks. - add a `Remove` method that is the same as `Store(txid, nil)` * remove unused hypothetical Execution interface * add Hash method to Transaction, fewer marshal errors, and CountingWriter * counting reader
- Loading branch information
1 parent
920ec25
commit 684c2ef
Showing
20 changed files
with
516 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.