github.com/tirogen/go-ethereum@v1.10.12-0.20221226051715-250cfede41b6/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/tirogen/go-ethereum/eth/protocols/snap"
    20  
    21  // GetAccountRange represents an account range query.
    22  type GetAccountRange snap.GetAccountRangePacket
    23  
    24  func (msg GetAccountRange) Code() int     { return 33 }
    25  func (msg GetAccountRange) ReqID() uint64 { return msg.ID }
    26  
    27  type AccountRange snap.AccountRangePacket
    28  
    29  func (msg AccountRange) Code() int     { return 34 }
    30  func (msg AccountRange) ReqID() uint64 { return msg.ID }
    31  
    32  type GetStorageRanges snap.GetStorageRangesPacket
    33  
    34  func (msg GetStorageRanges) Code() int     { return 35 }
    35  func (msg GetStorageRanges) ReqID() uint64 { return msg.ID }
    36  
    37  type StorageRanges snap.StorageRangesPacket
    38  
    39  func (msg StorageRanges) Code() int     { return 36 }
    40  func (msg StorageRanges) ReqID() uint64 { return msg.ID }
    41  
    42  type GetByteCodes snap.GetByteCodesPacket
    43  
    44  func (msg GetByteCodes) Code() int     { return 37 }
    45  func (msg GetByteCodes) ReqID() uint64 { return msg.ID }
    46  
    47  type ByteCodes snap.ByteCodesPacket
    48  
    49  func (msg ByteCodes) Code() int     { return 38 }
    50  func (msg ByteCodes) ReqID() uint64 { return msg.ID }
    51  
    52  type GetTrieNodes snap.GetTrieNodesPacket
    53  
    54  func (msg GetTrieNodes) Code() int     { return 39 }
    55  func (msg GetTrieNodes) ReqID() uint64 { return msg.ID }
    56  
    57  type TrieNodes snap.TrieNodesPacket
    58  
    59  func (msg TrieNodes) Code() int     { return 40 }
    60  func (msg TrieNodes) ReqID() uint64 { return msg.ID }