-
Notifications
You must be signed in to change notification settings - Fork 161
Conversation
x/evm/types/genesis.go
Outdated
return fmt.Errorf("address cannot be the zero address %s", ga.Address) | ||
} | ||
if ga.Code != nil && len(ga.Code) == 0 { | ||
return errors.New("code bytes cannot be empty") | ||
if ga.Code == "" || len(ethcmn.Hex2Bytes(ga.Code)) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cases seem redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either one, I think if one is satisfied then the other always is
type Recipient struct { | ||
Address string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this no longer an address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protobuf
AccountNonce uint64 | ||
Price *big.Int `json:"gasPrice"` | ||
GasLimit uint64 `json:"gas"` | ||
Recipient *ethcmn.Address `json:"to" rlp:"nil"` // nil means contract creation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just use *ethcmn.Address
as the recipient type in the msg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, because of the proto types we need to use string, and you can't take a string pointer on protobuf, so we need to wrap it on this Recipient
struct
V *big.Int `json:"v"` | ||
R *big.Int `json:"r"` | ||
S *big.Int `json:"s"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for these, why are these now []byte
in the msg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no big.Int
on protobuf
Description
Manual split of changes from #546. This PR updates struct types to the ones that will be defined on the proto files
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)