OSDN Git Service

filter source block height fed_prog
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 2 Jul 2019 07:34:13 +0000 (15:34 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 2 Jul 2019 07:34:13 +0000 (15:34 +0800)
federation/api/handler.go

index feca2fe..6abeada 100644 (file)
@@ -28,6 +28,11 @@ func (s *Server) ListCrosschainTxs(c *gin.Context, listTxsReq *listCrosschainTxs
                }
        }
 
+       // filter source block height
+       if srcBlockHeight, err := listTxsReq.GetFilterNum("source_block_height"); err == nil {
+               txFilter.SourceBlockHeight = srcBlockHeight.(uint64)
+       }
+
        // filter tx hash
        if txHash, err := listTxsReq.GetFilterString("source_tx_hash"); err == nil && txHash != "" {
                txFilter.SourceTxHash = txHash