-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Motivation
We need light-weight storage, which will store pending transactions list when relay is not using Redis. An in-memory store avoids external dependencies and lets us test TransactionPool logic without a real Redis server.
Description
Create a class LocalPendingTransactionStorage that implements PendingTransactionStorage.
Internally use a Map<string, Set> (address → set of tx hashes) and another Map<string, bytes> (txHash -> tx rlp encoded). This will be used in the future for endpoints requiring the whole pool to be returned
The class needs to have the following methods:
- getList(address: string): Promise
- addTransaction(address: string, txHash: string): Promise
- removeTransaction(address: string, txHash: string): Promise
- removeAll(): Promise
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request