TestTransactionHandle tests Function TransactionHandle handling a transaction message
(t *testing.T)
| 639 | |
| 640 | // TestTransactionHandle tests Function TransactionHandle handling a transaction message |
| 641 | func TestTransactionHandle(t *testing.T) { |
| 642 | code := []byte("ont") |
| 643 | invokeCodePayload := &payload.InvokeCode{ |
| 644 | Code: code, |
| 645 | } |
| 646 | tx := &ct.Transaction{ |
| 647 | Version: 0, |
| 648 | TxType: ct.InvokeNeo, |
| 649 | Payload: invokeCodePayload, |
| 650 | } |
| 651 | |
| 652 | buf := msgpack.NewTxn(tx) |
| 653 | |
| 654 | msg := &types.MsgPayload{ |
| 655 | Id: 0, |
| 656 | Addr: "127.0.0.1:50010", |
| 657 | Payload: buf, |
| 658 | } |
| 659 | |
| 660 | TransactionHandle(msg, network, nil) |
| 661 | } |
| 662 | |
| 663 | // TestAddrHandle tests Function AddrHandle handling a neighbor address response message |
| 664 | func TestAddrHandle(t *testing.T) { |
nothing calls this directly
no test coverage detected