From e5620d6387f2d854686b0b537bd12728d46f3945 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Thu, 17 Oct 2013 12:11:04 -0500 Subject: [PATCH] Correct reply for getrawmempool RPC command. The RPC command needs to return a slice of hash strings, not the underlying *btcwire.ShaHash bytes. --- rpcserver.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index f147097d..f7077222 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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, }