浏览代码

eth: check for DefaultConfig.NetworkId in test (#17599)

This makes the test work if NetworkId is changed in forks of go-ethereum.
Nguyen Kien Trung 6 年之前
父节点
当前提交
2823ce0086
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      eth/protocol_test.go

+ 1 - 1
eth/protocol_test.go

@@ -64,7 +64,7 @@ func testStatusMsgErrors(t *testing.T, protocol int) {
 		},
 		{
 			code: StatusMsg, data: statusData{uint32(protocol), 999, td, head.Hash(), genesis.Hash()},
-			wantError: errResp(ErrNetworkIdMismatch, "999 (!= 1)"),
+			wantError: errResp(ErrNetworkIdMismatch, "999 (!= %d)", DefaultConfig.NetworkId),
 		},
 		{
 			code: StatusMsg, data: statusData{uint32(protocol), DefaultConfig.NetworkId, td, head.Hash(), common.Hash{3}},