Merge pull request #704 from nspcc-dev/feature/getrawmempool

rpc: implement getrawmempool RPC
This commit is contained in:
Roman Khimov 2020-03-02 19:44:19 +03:00 committed by GitHub
commit 3282c6ed41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 1 deletions

View file

@ -214,6 +214,15 @@ Methods:
peers.AddBad(s.coreServer.BadPeers())
results = peers
case "getrawmempool":
getrawmempoolCalled.Inc()
mp := s.chain.GetMemPool()
hashList := make([]util.Uint256, 0)
for _, item := range mp.GetVerifiedTransactions() {
hashList = append(hashList, item.Tx.Hash())
}
results = hashList
case "getstorage":
getstorageCalled.Inc()
results, resultsErr = s.getStorage(reqParams)