(t *testing.T)
| 27 | ) |
| 28 | |
| 29 | func TestTxTransfer(t *testing.T) { |
| 30 | Convey("test transfer", t, func() { |
| 31 | h, err := hash.NewHashFromStr("000005aa62048f85da4ae9698ed59c14ec0d48a88a07c15a32265634e7e64ade") |
| 32 | So(err, ShouldBeNil) |
| 33 | addr := proto.AccountAddress(*h) |
| 34 | |
| 35 | t := NewTransfer(&TransferHeader{ |
| 36 | Sender: addr, |
| 37 | Nonce: 1, |
| 38 | }) |
| 39 | So(t.GetAccountAddress(), ShouldEqual, addr) |
| 40 | So(t.GetAccountNonce(), ShouldEqual, 1) |
| 41 | |
| 42 | priv, _, err := asymmetric.GenSecp256k1KeyPair() |
| 43 | So(err, ShouldBeNil) |
| 44 | So(t.Sign(priv), ShouldBeNil) |
| 45 | So(t.Verify(), ShouldBeNil) |
| 46 | }) |
| 47 | } |
nothing calls this directly
no test coverage detected