github.com/sixexorg/magnetic-ring@v0.0.0-20191119090307-31705a21e419/store/orgchain/states/account_state_test.go (about) 1 package states 2 3 import ( 4 "fmt" 5 "math/big" 6 "testing" 7 8 "github.com/sixexorg/magnetic-ring/common" 9 ) 10 11 func TestAccountState_Hash(t *testing.T) { 12 as := &AccountState{ 13 Address: common.Address{1, 2, 3}, 14 Height: 20, 15 Data: &Account{ 16 Nonce: 1, 17 Balance: big.NewInt(20), 18 EnergyBalance: big.NewInt(30), 19 BonusHeight: 20, 20 }, 21 } 22 fmt.Println(as.Hash().String()) 23 24 }