MCPcopy Create free account
hub / github.com/CPChain/chain / TestNull

Method TestNull

core/state/state_test.go:94–105  ·  view source on GitHub ↗
(c *checker.C)

Source from the content-addressed store, hash-verified

92}
93
94func (s *StateSuite) TestNull(c *checker.C) {
95 address := common.HexToAddress("0x823140710bf13990e4500136726d8b55")
96 s.state.CreateAccount(address)
97 //value := common.FromHex("0x823140710bf13990e4500136726d8b55")
98 var value common.Hash
99 s.state.SetState(address, common.Hash{}, value)
100 s.state.Commit(false)
101 value = s.state.GetState(address, common.Hash{})
102 if value != (common.Hash{}) {
103 c.Errorf("expected empty hash. got %x", value)
104 }
105}
106
107func (s *StateSuite) TestSnapshot(c *checker.C) {
108 stateobjaddr := toAddr([]byte("aa"))

Callers

nothing calls this directly

Calls 4

CreateAccountMethod · 0.65
SetStateMethod · 0.65
CommitMethod · 0.65
GetStateMethod · 0.65

Tested by

no test coverage detected