teamnsrg / ethereum-p2p

Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
17 stars 9 forks source link

case-study send function bugs and log format changes #46

Closed SimonSK closed 6 years ago

SimonSK commented 6 years ago

Log message formats:

sid1602 commented 6 years ago

For the DAO fork messages, I assume the log will contain the nodeid as well?

SimonSK commented 6 years ago

good catch. i totally screwed up the dao fork message. will push the change soon.

SimonSK commented 6 years ago

@sid1602 @zzma another logging format issue that's not too concerning. ETH_NEW_BLOCK_HASHES data is being logged like this: data=["{\"Hash\":\"0x4a2b1434bdbfae... With this PR, certain characters---including backslash but not quotes---are escaped, so the message now looks like: data=["{\\"Hash\\":\\"0x4a2b1434bdbfae... The first backslash comes from the following line escaping the double quote: https://github.com/teamnsrg/go-ethereum/blob/85a1acbfd70a50d81fe6aba073689b6bbf912e06/eth/protocol.go#L150-L152 I think removing ~the inner MarshalObj~ the for loop should fix this problem.