aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-04 03:16:55 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-04 03:16:55 +0800
commit988391fc37d54f8ca4e49a03bf5f6b240a3dfa33 (patch)
treea77ba7a10a45ecd04ed4dbdbb3a6b9f697077860 /eth/protocol.go
parentb1603f166e36de5959e780c8e8fc866ae3ceeca0 (diff)
parenta75af474f71606ed4572db216d9440b7c14a8a37 (diff)
downloaddexon-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.go7
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: