File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ from rlp import sedes
2
+
3
+ from p2p .protocol import (
4
+ Command ,
5
+ )
6
+
7
+ from trinity .rlp .sedes import HashOrNumber
8
+ from eth .beacon .types .blocks import BaseBeaconBlock
9
+ from eth .beacon .types .attestation_records import AttestationRecord
10
+
11
+
12
+ class Status (Command ):
13
+ _cmd_id = 0
14
+ structure = [
15
+ ('protocol_version' , sedes .big_endian_int ),
16
+ ('network_id' , sedes .big_endian_int ),
17
+ ('best_hash' , sedes .binary ),
18
+ ]
19
+
20
+
21
+ class GetBeaconBlocks (Command ):
22
+ _cmd_id = 1
23
+ structure = [
24
+ ('block_number_or_hash' , HashOrNumber ()),
25
+ ('max_headers' , sedes .big_endian_int ),
26
+ ]
27
+
28
+
29
+ class BeaconBlocks (Command ):
30
+ _cmd_id = 2
31
+ structure = sedes .CountableList (BaseBeaconBlock )
32
+
33
+
34
+ class AttestationRecords (Command ):
35
+ _cmd_id = 3
36
+ structure = sedes .CountableList (AttestationRecord )
You can’t perform that action at this time.
0 commit comments