fix: Eth JSON-RPC API: empty EthBytes serializes to '0x'.
This commit is contained in:
parent
9c500e119c
commit
ec667d49f4
@ -81,7 +81,7 @@ type EthBytes []byte
|
||||
|
||||
func (e EthBytes) MarshalJSON() ([]byte, error) {
|
||||
if len(e) == 0 {
|
||||
return json.Marshal("0x00")
|
||||
return json.Marshal("0x")
|
||||
}
|
||||
s := hex.EncodeToString(e)
|
||||
if len(s)%2 == 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user