mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
internal/ship/contract_row.go: rename DecodeContractRow to ParseContractRow
This commit is contained in:
parent
14a498d7d6
commit
a892b40cde
2 changed files with 3 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ type ContractRow struct {
|
|||
Value chain.Bytes `mapstructure:"value"`
|
||||
}
|
||||
|
||||
func DecodeContractRow(v map[string]interface{}) (*ContractRow, error) {
|
||||
func ParseContractRow(v map[string]interface{}) (*ContractRow, error) {
|
||||
out := &ContractRow{}
|
||||
err := mapstructure.WeakDecode(v, out)
|
||||
return out, err
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestContractRow_Decode(t *testing.T) {
|
||||
func TestContractRow_Parse(t *testing.T) {
|
||||
expected := &ship.ContractRow{
|
||||
Code: chain.N("eosio"),
|
||||
Scope: chain.N("scope"),
|
||||
|
|
@ -18,7 +18,7 @@ func TestContractRow_Decode(t *testing.T) {
|
|||
Value: []byte{0x01, 0x01, 0x02, 0x03},
|
||||
}
|
||||
|
||||
actual, err := ship.DecodeContractRow(map[string]any{
|
||||
actual, err := ship.ParseContractRow(map[string]any{
|
||||
"code": uint64(6138663577826885632),
|
||||
"scope": uint64(13990807175891517440),
|
||||
"table": uint64(3607749779137757184),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue