diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-04 03:16:55 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-04 03:16:55 +0800 |
commit | 988391fc37d54f8ca4e49a03bf5f6b240a3dfa33 (patch) | |
tree | a77ba7a10a45ecd04ed4dbdbb3a6b9f697077860 /eth/protocol.go | |
parent | b1603f166e36de5959e780c8e8fc866ae3ceeca0 (diff) | |
parent | a75af474f71606ed4572db216d9440b7c14a8a37 (diff) | |
download | dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.tar dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.tar.gz dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.tar.bz2 dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.tar.lz dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.tar.xz dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.tar.zst dexon-988391fc37d54f8ca4e49a03bf5f6b240a3dfa33.zip |
Merge pull request #409 from tgerring/jsonlogs
Updated JSON log events
Diffstat (limited to 'eth/protocol.go')
-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: |