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:
Dave Collins 2013-10-17 12:11:04 -05:00
parent ff20c420a2
commit e5620d6387

View File

@ -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,
}