rpc: implement getrawmempool RPC

closes #175
This commit is contained in:
Anna Shaleva 2020-03-02 19:13:44 +03:00
parent 252a9f2f31
commit e1fe12a07f
5 changed files with 69 additions and 1 deletions

View file

@ -210,6 +210,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)