TestTxCheckType tests Transaction's CheckType() function.
(t *testing.T)
| 235 | |
| 236 | // TestTxCheckType tests Transaction's CheckType() function. |
| 237 | func TestTxCheckType(t *testing.T) { |
| 238 | tx := NewTransaction(0, common.HexToAddress("0xb794f5ea0ba39494ce83a213fffba74279579268"), new(big.Int), 0, new(big.Int), nil) |
| 239 | tx.SetType(PrivateTx) |
| 240 | if !tx.CheckType(PrivateTx) { |
| 241 | t.Fatal("The types of transaction should include Private") |
| 242 | } |
| 243 | tx.SetType(BasicTx) |
| 244 | if tx.CheckType(PrivateTx) { |
| 245 | t.Fatal("The types of transaction should NOT include Private") |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | // TestTxSetType tests Transaction's SetType(), Type() function. |
| 250 | func TestTxSetType(t *testing.T) { |
nothing calls this directly
no test coverage detected