mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-11 15:30:07 +00:00
23 lines
438 B
Go
23 lines
438 B
Go
|
package payload
|
||
|
|
||
|
import (
|
||
|
"github.com/CityOfZion/neo-go/pkg/wire/command"
|
||
|
"github.com/CityOfZion/neo-go/pkg/wire/util"
|
||
|
)
|
||
|
|
||
|
type GetBlocksMessage struct {
|
||
|
*GetHeadersMessage
|
||
|
}
|
||
|
|
||
|
func NewGetBlocksMessage(start []util.Uint256, stop util.Uint256) (*GetBlocksMessage, error) {
|
||
|
GetHeaders, err := newAbstractGetHeaders(start, stop, command.GetBlocks)
|
||
|
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &GetBlocksMessage{
|
||
|
GetHeaders,
|
||
|
}, nil
|
||
|
|
||
|
}
|