github.com/Cleverse/go-ethereum@v0.0.0-20220927095127-45113064e7f2/cmd/devp2p/internal/ethtest/snapTypes.go (about) 1 // Copyright 2022 The go-ethereum Authors 2 // This file is part of go-ethereum. 3 // 4 // go-ethereum is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // go-ethereum is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. 16 17 package ethtest 18 19 import "github.com/ethereum/go-ethereum/eth/protocols/snap" 20 21 // GetAccountRange represents an account range query. 22 type GetAccountRange snap.GetAccountRangePacket 23 24 func (g GetAccountRange) Code() int { return 33 } 25 26 type AccountRange snap.AccountRangePacket 27 28 func (g AccountRange) Code() int { return 34 } 29 30 type GetStorageRanges snap.GetStorageRangesPacket 31 32 func (g GetStorageRanges) Code() int { return 35 } 33 34 type StorageRanges snap.StorageRangesPacket 35 36 func (g StorageRanges) Code() int { return 36 } 37 38 type GetByteCodes snap.GetByteCodesPacket 39 40 func (g GetByteCodes) Code() int { return 37 } 41 42 type ByteCodes snap.ByteCodesPacket 43 44 func (g ByteCodes) Code() int { return 38 } 45 46 type GetTrieNodes snap.GetTrieNodesPacket 47 48 func (g GetTrieNodes) Code() int { return 39 } 49 50 type TrieNodes snap.TrieNodesPacket 51 52 func (g TrieNodes) Code() int { return 40 }