github.com/MetalBlockchain/metalgo@v1.11.9/snow/engine/common/request.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package common
     5  
     6  import (
     7  	"fmt"
     8  
     9  	"github.com/MetalBlockchain/metalgo/ids"
    10  )
    11  
    12  type Request struct {
    13  	NodeID    ids.NodeID
    14  	RequestID uint32
    15  }
    16  
    17  func (r Request) MarshalText() ([]byte, error) {
    18  	return []byte(fmt.Sprintf("%s:%d", r.NodeID, r.RequestID)), nil
    19  }