good morning!!!!

Skip to content
Snippets Groups Projects
Commit e31ec57f authored by Taylor Gerring's avatar Taylor Gerring
Browse files

Add event eth.tx.received

parent 0976c302
Branches
Tags
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment