mirror of
https://github.com/LBRYFoundation/lbcd.git
synced 2025-08-23 17:47:24 +00: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
1 changed files with 5 additions and 1 deletions
|
@ -539,8 +539,12 @@ func jsonRead(body []byte, s *rpcServer) (reply btcjson.Reply, err error) {
|
||||||
|
|
||||||
case "getrawmempool":
|
case "getrawmempool":
|
||||||
hashes := s.server.txMemPool.TxShas()
|
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{
|
reply = btcjson.Reply{
|
||||||
Result: hashes,
|
Result: hashStrings,
|
||||||
Id: &message.Id,
|
Id: &message.Id,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue