mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 12:37:16 +00:00
8d8e41cd85
* call bufio.Flush * rerun ci * handle errors better * correct sleep
32 lines
634 B
Go
32 lines
634 B
Go
package eth
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/p2p"
|
|
)
|
|
|
|
const (
|
|
dbg1 = 1
|
|
)
|
|
|
|
const DebugName = "dbg" // Parity only supports 3 letter capabilities
|
|
var DebugVersions = []uint{dbg1}
|
|
var DebugLengths = map[uint]uint64{dbg1: 2}
|
|
|
|
const DebugMaxMsgSize = 10 * 1024 * 1024
|
|
|
|
// Debug customization for simulator, move it to sub-protocol
|
|
const (
|
|
DebugSetGenesisMsg = 0x00
|
|
)
|
|
|
|
type debugPeer struct {
|
|
*p2p.Peer
|
|
rw p2p.MsgReadWriter
|
|
}
|
|
|
|
// SendByteCode sends a BytecodeCode message.
|
|
func (p *debugPeer) SendByteCode(id uint64, data [][]byte) error {
|
|
msg := bytecodeMsg{ID: id, Code: data}
|
|
return p2p.Send(p.rw, BytecodeCode, msg)
|
|
}
|