core/types, core/vm: improve docs, add JSON marshaling methods
In this commit, core/types's types learn how to encode and decode themselves as JSON. The encoding is very similar to what the RPC API uses. The RPC API is missing some output fields (e.g. transaction signature values) which will be added to the API in a later commit. Some fields that the API generates are ignored by the decoder methods here.
Showing
- core/types/block.go 110 additions, 64 deletionscore/types/block.go
- core/types/bloom9.go 22 additions, 2 deletionscore/types/bloom9.go
- core/types/json.go 87 additions, 0 deletionscore/types/json.go
- core/types/json_test.go 136 additions, 0 deletionscore/types/json_test.go
- core/types/receipt.go 46 additions, 8 deletionscore/types/receipt.go
- core/types/transaction.go 61 additions, 4 deletionscore/types/transaction.go
- core/vm/log.go 68 additions, 21 deletionscore/vm/log.go
- core/vm/log_test.go 59 additions, 0 deletionscore/vm/log_test.go
Loading
Please register or sign in to comment