mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 18:00:11 +01:00
Correct reply for getrawmempool RPC command.
The RPC command needs to return a slice of hash strings, not the underlying *btcwire.ShaHash bytes.
This commit is contained in:
parent
ff20c420a2
commit
e5620d6387
@ -539,8 +539,12 @@ func jsonRead(body []byte, s *rpcServer) (reply btcjson.Reply, err error) {
|
||||
|
||||
case "getrawmempool":
|
||||
hashes := s.server.txMemPool.TxShas()
|
||||
hashStrings := make([]string, len(hashes))
|
||||
for i := 0; i < len(hashes); i++ {
|
||||
hashStrings[i] = hashes[i].String()
|
||||
}
|
||||
reply = btcjson.Reply{
|
||||
Result: hashes,
|
||||
Result: hashStrings,
|
||||
Id: &message.Id,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user