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

Function TestRecipientEmpty

types/transaction_test.go:88–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestRecipientEmpty(t *testing.T) {
89 _, addr := defaultTestKey()
90 tx, err := decodeTx(common.Hex2Bytes("f84a808080808080011ca09b16de9d5bdee2cf56c28d16275a4da68cd30273e2525f3959f5d62557489921a0372ebd8fb3345f7db7b5a86d42e24d36e983e259b0664ceb8c227ec9af572f3d"))
91 if err != nil {
92 t.Error(err)
93 t.FailNow()
94 }
95
96 from, err := Sender(HomesteadSigner{}, tx)
97 if err != nil {
98 t.Error(err)
99 t.FailNow()
100 }
101 if addr != from {
102 t.Error("derived address doesn't match")
103 }
104}
105
106func TestRecipientNormal(t *testing.T) {
107 _, addr := defaultTestKey()

Callers

nothing calls this directly

Calls 4

defaultTestKeyFunction · 0.85
decodeTxFunction · 0.85
SenderFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected