Skip to content

Commit

Permalink
evil: #1106 - update IBC VP tests chain IDs in tx construction
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Apr 7, 2023
1 parent 5426cff commit 239d8ca
Showing 1 changed file with 102 additions and 34 deletions.
136 changes: 102 additions & 34 deletions shared/src/ledger/ibc/vp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -802,8 +806,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -950,8 +958,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1050,8 +1062,12 @@ mod tests {
let tx_index = TxIndex::default();
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1134,8 +1150,12 @@ mod tests {
let tx_index = TxIndex::default();
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1204,8 +1224,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1293,8 +1317,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1393,8 +1421,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1490,8 +1522,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1531,8 +1567,12 @@ mod tests {
let tx_index = TxIndex::default();
let tx_code = vec![];
let tx_data = vec![];
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1573,8 +1613,12 @@ mod tests {
let tx_index = TxIndex::default();
let tx_code = vec![];
let tx_data = vec![];
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1665,8 +1709,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1762,8 +1810,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1867,8 +1919,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -1963,8 +2019,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -2070,8 +2130,12 @@ mod tests {
let tx_code = vec![];
let mut tx_data = vec![];
msg.to_any().encode(&mut tx_data).expect("encoding failed");
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down Expand Up @@ -2124,8 +2188,12 @@ mod tests {
let tx_index = TxIndex::default();
let tx_code = vec![];
let tx_data = vec![];
let tx = Tx::new(tx_code, Some(tx_data), storage.chain_id.clone())
.sign(&keypair_1());
let tx = Tx::new(
tx_code,
Some(tx_data),
wl_storage.storage.chain_id.clone(),
)
.sign(&keypair_1());
let gas_meter = VpGasMeter::new(0);
let (vp_wasm_cache, _vp_cache_dir) =
wasm::compilation_cache::common::testing::cache();
Expand Down

0 comments on commit 239d8ca

Please sign in to comment.