core, core/types: refactored tx chain id checking
Refactored explicit chain id checking in to the Sender deriviation method
This commit is contained in:
		| @@ -1226,11 +1226,8 @@ func TestEIP155Transition(t *testing.T) { | ||||
| 			block.AddTx(tx) | ||||
| 		} | ||||
| 	}) | ||||
| 	errExp := "Invalid transaction chain id. Current chain id: 1 tx chain id: 2" | ||||
| 	_, err := blockchain.InsertChain(blocks) | ||||
| 	if err == nil { | ||||
| 		t.Error("expected transaction chain id error") | ||||
| 	} else if err.Error() != errExp { | ||||
| 		t.Error("expected:", errExp, "got:", err) | ||||
| 	if err != types.ErrInvalidChainId { | ||||
| 		t.Error("expected error:", types.ErrInvalidChainId) | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user