mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
rpc: update docstring (#26072)
Co-authored-by: seven <seven@nodereal.io>
This commit is contained in:
parent
2c1af8b1ec
commit
fb4a97f33f
@ -69,7 +69,7 @@ const (
|
||||
)
|
||||
|
||||
// UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports:
|
||||
// - "latest", "earliest" or "pending" as string arguments
|
||||
// - "safe", "finalized", "latest", "earliest" or "pending" as string arguments
|
||||
// - the block number
|
||||
// Returned errors:
|
||||
// - an invalid block number error when the given argument isn't a known strings
|
||||
@ -110,7 +110,7 @@ func (bn *BlockNumber) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler. It marshals:
|
||||
// - "latest", "earliest" or "pending" as strings
|
||||
// - "safe", "finalized", "latest", "earliest" or "pending" as strings
|
||||
// - other numbers as hex
|
||||
func (bn BlockNumber) MarshalText() ([]byte, error) {
|
||||
switch bn {
|
||||
|
Loading…
Reference in New Issue
Block a user