From 61e2f90f4fa5b86c650c30ee55e1b37d205c592f Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Wed, 9 May 2018 13:42:51 +0200 Subject: [PATCH] Handle mempool transactions in test of logged socket.io --- server/socketio_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/socketio_test.go b/server/socketio_test.go index c4f6a36e..d23fa8d6 100644 --- a/server/socketio_test.go +++ b/server/socketio_test.go @@ -281,14 +281,15 @@ func verifyGetDetailedTransaction(t *testing.T, id int, lrs *logRequestResponse, } return nil } - // the tx in the log could have been still in mempool with height -1 + // the tx in the log could have been still in mempool with Height -1 if (bbResponse.Result.Height != logResponse.Result.Height && logResponse.Result.Height != -1) || bbResponse.Result.Hash != logResponse.Result.Hash { t.Log("getDetailedTransaction", id, "mismatch bb:", bbResponse.Result.Hash, bbResponse.Result.Height, "log:", logResponse.Result.Hash, logResponse.Result.Height) return } - if bbResponse.Result.BlockTimestamp != logResponse.Result.BlockTimestamp { + // the tx in the log could have been still in mempool with BlockTimestamp 0 + if bbResponse.Result.BlockTimestamp != logResponse.Result.BlockTimestamp && logResponse.Result.BlockTimestamp != 0 { t.Log("getDetailedTransaction", id, "mismatch BlockTimestamp:", bbResponse.Result.BlockTimestamp, "log:", logResponse.Result.BlockTimestamp) return