diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-02 22:17:09 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-02 22:17:09 +0800 |
commit | e31ec57f8875147766b2bf8e6f129b9a0c1b5e69 (patch) | |
tree | c2b8eef084f85a3c5ca8967e91931175e71dce90 | |
parent | 0976c3024f271e89d1d4de32dfb518c02e691643 (diff) | |
download | dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.tar dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.tar.gz dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.tar.bz2 dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.tar.lz dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.tar.xz dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.tar.zst dexon-e31ec57f8875147766b2bf8e6f129b9a0c1b5e69.zip |
Add event eth.tx.received
-rw-r--r-- | eth/protocol.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/eth/protocol.go b/eth/protocol.go index 8221c1b29..a5cc8ee1a 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rlp" ) @@ -137,6 +138,12 @@ func (self *ethProtocol) handle() error { if err := msg.Decode(&txs); err != nil { return self.protoError(ErrDecode, "msg %v: %v", msg, err) } + for _, tx := range txs { + jsonlogger.LogJson(&logger.EthTxReceived{ + TxHash: ethutil.Bytes2Hex(tx.Hash()), + RemoteId: self.peer.ID().String(), + }) + } self.txPool.AddTransactions(txs) case GetBlockHashesMsg: |