From ddf9d36c255ee757ef12dca2d8b0146e32e78901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Fri, 16 Aug 2024 10:49:35 +0200 Subject: [PATCH] Update all tests to an Albatross network ID Most tests still used the NetworkId::Dummy, which is not an Albatross ID, so doesn't include sender_data into a transaction's serialized_content, thus not testing the whole Albatross range. --- blockchain/src/history/history_store.rs | 2 +- blockchain/src/history/history_store_index.rs | 2 +- genesis-builder/src/lib.rs | 2 +- primitives/account/tests/accounts.rs | 4 +-- .../account/tests/staking_contract/mod.rs | 6 ++-- .../account/tests/staking_contract/staker.rs | 2 +- .../transaction/tests/basic_account_verify.rs | 4 +-- .../tests/staking_contract_verify.rs | 30 +++++++++---------- .../src/performance/history-store/main.rs | 2 +- transaction-builder/tests/htlc_contract.rs | 12 ++++---- transaction-builder/tests/staking_contract.rs | 30 +++++++++---------- transaction-builder/tests/vesting_contract.rs | 12 ++++---- wallet/tests/multisig.rs | 4 +-- 13 files changed, 56 insertions(+), 56 deletions(-) diff --git a/blockchain/src/history/history_store.rs b/blockchain/src/history/history_store.rs index ad554e978c..5c2f6be8b2 100644 --- a/blockchain/src/history/history_store.rs +++ b/blockchain/src/history/history_store.rs @@ -1512,7 +1512,7 @@ mod tests { Coin::from_u64_unchecked(value), Coin::from_u64_unchecked(0), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), )), } diff --git a/blockchain/src/history/history_store_index.rs b/blockchain/src/history/history_store_index.rs index 8e1e5df7cd..b3d5a7f68c 100644 --- a/blockchain/src/history/history_store_index.rs +++ b/blockchain/src/history/history_store_index.rs @@ -1450,7 +1450,7 @@ mod tests { Coin::from_u64_unchecked(value), Coin::from_u64_unchecked(0), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), )), } diff --git a/genesis-builder/src/lib.rs b/genesis-builder/src/lib.rs index 8347c576ed..2352b7fa65 100644 --- a/genesis-builder/src/lib.rs +++ b/genesis-builder/src/lib.rs @@ -103,7 +103,7 @@ impl Default for GenesisBuilder { impl GenesisBuilder { fn new_without_defaults() -> Self { GenesisBuilder { - network: NetworkId::Dummy, + network: NetworkId::UnitAlbatross, timestamp: None, vrf_seed: None, parent_election_hash: None, diff --git a/primitives/account/tests/accounts.rs b/primitives/account/tests/accounts.rs index b885ad7485..003a2a20bd 100644 --- a/primitives/account/tests/accounts.rs +++ b/primitives/account/tests/accounts.rs @@ -803,7 +803,7 @@ fn it_commits_valid_and_failing_txns() { 2000.try_into().unwrap(), 200.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); tx.sender_type = AccountType::Vesting; @@ -847,7 +847,7 @@ fn it_commits_valid_and_failing_txns() { 2000.try_into().unwrap(), 200.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); // tx.sender_type = AccountType::Basic; diff --git a/primitives/account/tests/staking_contract/mod.rs b/primitives/account/tests/staking_contract/mod.rs index f4e8013a70..56d32f9dd8 100644 --- a/primitives/account/tests/staking_contract/mod.rs +++ b/primitives/account/tests/staking_contract/mod.rs @@ -85,7 +85,7 @@ fn make_incoming_transaction(data: IncomingStakingTransactionData, value: u64) - value.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), _ => Transaction::new_signaling( non_existent_address(), @@ -95,7 +95,7 @@ fn make_incoming_transaction(data: IncomingStakingTransactionData, value: u64) - 100.try_into().unwrap(), data.serialize_to_vec(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), } } @@ -143,7 +143,7 @@ fn make_delete_validator_transaction() -> Transaction { (Policy::VALIDATOR_DEPOSIT - 100).try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let private_key = diff --git a/primitives/account/tests/staking_contract/staker.rs b/primitives/account/tests/staking_contract/staker.rs index d8d47d8ab5..07bcd52511 100644 --- a/primitives/account/tests/staking_contract/staker.rs +++ b/primitives/account/tests/staking_contract/staker.rs @@ -56,7 +56,7 @@ fn make_remove_stake_transaction_with_fee(value: u64, fee: u64) -> Transaction { value.try_into().unwrap(), fee.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let private_key = diff --git a/primitives/transaction/tests/basic_account_verify.rs b/primitives/transaction/tests/basic_account_verify.rs index 893136e2f1..5f11e290dd 100644 --- a/primitives/transaction/tests/basic_account_verify.rs +++ b/primitives/transaction/tests/basic_account_verify.rs @@ -15,7 +15,7 @@ fn it_does_not_allow_creation() { 100.try_into().unwrap(), 0.try_into().unwrap(), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); assert_eq!( @@ -36,7 +36,7 @@ fn it_does_not_allow_signalling() { 0.try_into().unwrap(), vec![], 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); assert_eq!( diff --git a/primitives/transaction/tests/staking_contract_verify.rs b/primitives/transaction/tests/staking_contract_verify.rs index 8924e1ee3c..92f611ca4a 100644 --- a/primitives/transaction/tests/staking_contract_verify.rs +++ b/primitives/transaction/tests/staking_contract_verify.rs @@ -52,7 +52,7 @@ fn it_does_not_support_contract_creation() { 100.try_into().unwrap(), 0.try_into().unwrap(), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); assert_eq!( @@ -94,7 +94,7 @@ fn create_validator() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103b40400b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a844713c60858b5c72adcf8b72b4dbea959d042769dcc93a0190e4b8aec92283548138833950aa214d920c17d3d19de27f6176d9fb21620edae76ad398670e17d5eba2f494b9b6901d457592ea68f9d35380c857ba44856ae037aff272ad6c1900442b426dde0bc53431e9ce5807f7ec4a05e71ce4a1e7e7b2511891521c4d3fd975764e3031ef646d48fa881ad88240813d40e533788f0dac2bc4d4c25db7b108c67dd28b7ec4c240cdc044badcaed7860a5d3da42ef860ed25a6db9c07be000a7f504f6d1b24ac81642206d5996b20749a156d7b39f851e60f228b19eef3fb3547469f03fc9764f5f68bc88e187ffee0f43f169acde847c78ea88029cdb19b91dd9562d60b607dd0347d67a0e33286c8908e4e9579a42685da95f06a92010303030303030303030303030303030303030303010000000000000000000000000000000000000000000000000000000000000000b7561c15e53da2c482bfafddbf404f28b14ee2743e5cfe451c860da378b2ac23a651b574183d1287e2cea109943a34c44a7df9eb2fe5067c70f1c02bde900828c232a3d7736a278e0e8ac679bc2a1669f660c3810980526b7890f6e1708381007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b53007ab5fde15123c63c336126a015abd507e407fe589e5d6b706926ccae1b35981c1df0d68bb844552a9c35b736acab0da09e06fc409d5dbac9e5ab76018632290d00000002540be40000000000000000640000000104006200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500e8addc6dbdf064ef3fb9b642f53c17e0662077b12b782d474acae27216316222a0bdb81fd52c1af4be0c22ce1efddd156ce88e8d927a3e1843b100fa922fd306"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103b40400b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a844713c60858b5c72adcf8b72b4dbea959d042769dcc93a0190e4b8aec92283548138833950aa214d920c17d3d19de27f6176d9fb21620edae76ad398670e17d5eba2f494b9b6901d457592ea68f9d35380c857ba44856ae037aff272ad6c1900442b426dde0bc53431e9ce5807f7ec4a05e71ce4a1e7e7b2511891521c4d3fd975764e3031ef646d48fa881ad88240813d40e533788f0dac2bc4d4c25db7b108c67dd28b7ec4c240cdc044badcaed7860a5d3da42ef860ed25a6db9c07be000a7f504f6d1b24ac81642206d5996b20749a156d7b39f851e60f228b19eef3fb3547469f03fc9764f5f68bc88e187ffee0f43f169acde847c78ea88029cdb19b91dd9562d60b607dd0347d67a0e33286c8908e4e9579a42685da95f06a92010303030303030303030303030303030303030303010000000000000000000000000000000000000000000000000000000000000000b7561c15e53da2c482bfafddbf404f28b14ee2743e5cfe451c860da378b2ac23a651b574183d1287e2cea109943a34c44a7df9eb2fe5067c70f1c02bde900828c232a3d7736a278e0e8ac679bc2a1669f660c3810980526b7890f6e1708381007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b530079dbb852cfc6b9571b4bbed6f0f302d8f1deef55640998c2145b56aed007fc1b92222a2778ed3b562f59b23570e6fd1dfb7af07cf08cd6e58f401aa7dba7c70d00000002540be40000000000000000640000000107006200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500614003ac99ddcb92b8af398ff1b554d3b664f033a27b04fe9d265ac426d1fde1b2ea9fbee26bf0c8e62b89f273a984806d79de67e836c9fcec3455639b58480a"; let tx_size = 731; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -204,7 +204,7 @@ fn update_validator() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103b9040101b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84401713c60858b5c72adcf8b72b4dbea959d042769dcc93a0190e4b8aec92283548138833950aa214d920c17d3d19de27f6176d9fb21620edae76ad398670e17d5eba2f494b9b6901d457592ea68f9d35380c857ba44856ae037aff272ad6c1900442b426dde0bc53431e9ce5807f7ec4a05e71ce4a1e7e7b2511891521c4d3fd975764e3031ef646d48fa881ad88240813d40e533788f0dac2bc4d4c25db7b108c67dd28b7ec4c240cdc044badcaed7860a5d3da42ef860ed25a6db9c07be000a7f504f6d1b24ac81642206d5996b20749a156d7b39f851e60f228b19eef3fb3547469f03fc9764f5f68bc88e187ffee0f43f169acde847c78ea88029cdb19b91dd9562d60b607dd0347d67a0e33286c8908e4e9579a42685da95f06a92010103030303030303030303030303030303030303030101000000000000000000000000000000000000000000000000000000000000000001b7561c15e53da2c482bfafddbf404f28b14ee2743e5cfe451c860da378b2ac23a651b574183d1287e2cea109943a34c44a7df9eb2fe5067c70f1c02bde900828c232a3d7736a278e0e8ac679bc2a1669f660c3810980526b7890f6e1708381007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b5300295608af6c7274e006e73c5feb3c9d2702f10495a1b1bdbfb511e27620b68ba45510c1fa0cfae02f30340977f7fe02f182e735510ce4c0bb1bd71c94eec8750a000000000000000000000000000000640000000104026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd9105004ff4444f57727aa2bd7ca971d587d2fd21ff2a1545f99e6a77d2e2482c6417abcddef22173c16537dc437a2091c42cb335dea90a02e39262e5abda2b02b7f70c"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103b9040101b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84401713c60858b5c72adcf8b72b4dbea959d042769dcc93a0190e4b8aec92283548138833950aa214d920c17d3d19de27f6176d9fb21620edae76ad398670e17d5eba2f494b9b6901d457592ea68f9d35380c857ba44856ae037aff272ad6c1900442b426dde0bc53431e9ce5807f7ec4a05e71ce4a1e7e7b2511891521c4d3fd975764e3031ef646d48fa881ad88240813d40e533788f0dac2bc4d4c25db7b108c67dd28b7ec4c240cdc044badcaed7860a5d3da42ef860ed25a6db9c07be000a7f504f6d1b24ac81642206d5996b20749a156d7b39f851e60f228b19eef3fb3547469f03fc9764f5f68bc88e187ffee0f43f169acde847c78ea88029cdb19b91dd9562d60b607dd0347d67a0e33286c8908e4e9579a42685da95f06a92010103030303030303030303030303030303030303030101000000000000000000000000000000000000000000000000000000000000000001b7561c15e53da2c482bfafddbf404f28b14ee2743e5cfe451c860da378b2ac23a651b574183d1287e2cea109943a34c44a7df9eb2fe5067c70f1c02bde900828c232a3d7736a278e0e8ac679bc2a1669f660c3810980526b7890f6e1708381007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b5300ff327a38d36a5a3aa0052a3c761fd4f820b4289f19522a299004c747676e364522b24317a332bd65f9dcee8a207e7ef5096f7a09c15155a9f3159ca623226306000000000000000000000000000000640000000107026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500da1106e3cc1137a33b7a34101d6a15ad12357280b5d8e1de39702f2890e9f0d597f2e14b2f0e5b45dd6f5fbe9a3e9112b8d3463f1fdd79f77a468386ff916b0a"; let tx_size = 736; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -312,7 +312,7 @@ fn deactivate_validator() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103770283fa05dbe31f85e719f4c4fd67ebdba2e444d9f800b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84400e281586c62ba61c1139a95dd1ab02454ed0c2d4eaf0441eca4f21baefa9b37dc6ad3f64aa9e93e42e0349f931799504c14c19e6282bb77f9bea7620b1eb0f106000000000000000000000000000000640000000104026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd91050010fbe4b82ce0f02a32fc7c90a00c8ec20904041423bd3239ec355cb8589cf1b173ed8999063d9e1f7afe72aa2a2c2fe83ac38fd63adecb3929e4cdd85d4d6505"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103770283fa05dbe31f85e719f4c4fd67ebdba2e444d9f800b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84400ba13522884a716f0688ceeeaabf37e91cbee9798d05ff5f03d3eb2f0ff280f20f83c1327d1f2a908fcecebdfa194283150dde38627c0b91e2c5175c2bef98102000000000000000000000000000000640000000107026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500cc3d26a7c19aca652c22aadb2fee3f104b35dff438d4a4ae3d46f44e762027c3fad96ed24a35460d14be9c5a17eb9b120560ce58a002724ccc2b9dd49c6d510c"; let tx_size = 285; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -369,7 +369,7 @@ fn reactivate_validator() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103770383fa05dbe31f85e719f4c4fd67ebdba2e444d9f800b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84400deaba5374c18fe4c11c9ed8e9d7c9dd62b177689675b123074a943880a33941e73c5d9b1ecccd8fab51bee29337f0672cb34fd01fc7a18830f03bfd10880ad00000000000000000000000000000000640000000104026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500d2c62b32d87cd77d70232c7cc0935dd5bdf093ec8db07b7081063d7a8a514a7b9d43fad4dca7cc1b1a9a8dd32011afb1fc84f3716ddac8f819cd84130a60ce04"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103770383fa05dbe31f85e719f4c4fd67ebdba2e444d9f800b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a844005fe2ead749549fb7d329ef9f99bf5693c87977fd3253400581a8b832d2bef6a705d6fe76ba1e875ade5f0185396cde41622497a9761959adf7ccfca99bcfff07000000000000000000000000000000640000000107026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd91050000f1a9c7bc1883df69d8dab50661ea56a22b64764b0206fef6f533a47504d924c6574f493f591519ea633e5c7a24fa79f13384d571e5c466c6ca7b0fe8b3100f"; let tx_size = 285; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -425,7 +425,7 @@ fn retire_validator() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103630400b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84400214acc4c13b8563a1b03ca59ebc18fde38a668e3250d72d7d826d6c6398da9f5558e4a1f9ad179e17c3c82203c4691b8500be81d9bd150b60e8b1dc6c434870d000000000000000000000000000000640000000104026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500ce063800488dc13de4fc76ed056988ef667a2a9bb1d1a216695a05bde87fb38d1ce2acae2276e8969571a4576ddf3880f0b98b46ec5d32110f894d8833725906"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c0000000000000000000000000000000000000000000103630400b300481ddd7af6be3cf5c123b7af2c21f87f4ac808c8b0e622eb85826124a84400fd7e470f62d7d89158109c0440c2815a6829a962ee838b02fb69840a5b8e6b8b58fe830981328064a45053b28b9abe7ace71838f60c5881b3d352c02f2067908000000000000000000000000000000640000000107026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd9105003a86c09bd9dc35a226f2444c4c5ce564fda1958571682aaf7548b210d41969c4b2c85b662f5769b9c5916e5abd3b841355fd011ae7b19b7553693621ba76f805"; let tx_size = 265; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -481,7 +481,7 @@ fn create_staker() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000000000000000000000000000000010378050183fa05dbe31f85e719f4c4fd67ebdba2e444d9f800b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd9105005074b55d33b23b7b4db9a3f0ee0aa49ec2df22f05a368aa81907f983cd6f1aa932d23c462fd64d8639c703cd7e22be10d7286960b12e15182df1b4b77820c80e000000000098968000000000000000640000000104006200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500020110ff4f92478d8ccedda1d6ad6e713f82eecfb35b3a5faf7e0fbfeca3a5fc11bf5437b7f444dd9320e3d19336b2f6c7d5c5fbc1c64418d187dcf6b416b207"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000000000000000000000000000000010378050183fa05dbe31f85e719f4c4fd67ebdba2e444d9f800b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd91050078848bb51c29e0cfa5ef76c851f65366dc788e9f9b8c1cba28972eb9aaa4a2464bb43262985ef0703568865f765460a83e8694b25665f0bc249de3096464df0b000000000098968000000000000000640000000107006200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd91050032e29c914094d23a4ce65921041227208820b24551b97e72703c8bcc8f3084ba4680e9e8fd926462f021c4a54dce5f864ba2112ba032afcb68a82935cc402503"; let tx_size = 286; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -536,7 +536,7 @@ fn stake() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000000000000000000000000000000010315068c551fabc6e6e00c609c3f0313257ad7e835643c000000000000006400000000000000640000000104006200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500ec9d59330a36169dc602dbdab7c4ec1a289b9a9b97938219db0585da337195b651def72d25b8a29c7b00936ac44a21f59db467c8e0646cfe9641b88e306f650d"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000000000000000000000000000000010315068c551fabc6e6e00c609c3f0313257ad7e835643c000000000000006400000000000000640000000107006200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500f5d801f531117483118108b30cd606301a424ba63147f3f0a2e085bd655fd15c8eafb971a39883fc9da3711d7ac474cd6047eed7791ec6e00c6ed1a464fddb01"; let tx_size = 187; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -568,7 +568,7 @@ fn update_staker() { None, ); - let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000000000000000000000000000000010379070183fa05dbe31f85e719f4c4fd67ebdba2e444d9f80000b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500e1c9a7664f978647e563434d6b4be25127bdd509d483577613a8f47a9dc231a18389f57b976eedf5905d31bed6cd74b1432c51faed9956a13ade677d50d1620a000000000000000000000000000000640000000104026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500e39ce80d5183929fd737d2f916ce17f81beae41423c33ca70e1a35f94cece4798a24e22a548583dad2ea7dffa28d3110206adcae51f3b70345df1e25f8cb5005"; + let tx_hex = "018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000000000000000000000000000000010379070183fa05dbe31f85e719f4c4fd67ebdba2e444d9f80000b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd91050086b3e9305b69d7228967569082a4b870c9dea0ea5e83c4e1f2866f492bc2c974ecc92ea595e23825b3ea7846a85af397c38c32689c3e38c5de244845a2f68b0b000000000000000000000000000000640000000107026200b3adb13fe6887f6cdcb8c82c429f718fcdbbb27b2a19df7c1ea9814f19cd910500aad587075d132f1b28335360fa5fed46c9fafd56119606981891cf7f9eec58dcdaebb55bb52a253e9c0cc5e14bb83977b99f4a15f15f48ecce8399796c618606"; let tx_size = 287; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -615,7 +615,7 @@ fn delete_validator() { // Test serialization and deserialization. let tx = make_delete_validator_tx(Policy::VALIDATOR_DEPOSIT - 100, false); - let tx_hex = "0100000000000000000000000000000000000000010301008c551fabc6e6e00c609c3f0313257ad7e835643c000000000002540be39c000000000000006400000001040062007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b530030cbf4a38c09c34c29e79e89be61e8ec4a3f1f36a532a04a699e99e714e952b8c3c09db2786d6e0f8ecd2deeb2638421cca4e4c12c5adcc1b532756934dfc10c"; + let tx_hex = "0100000000000000000000000000000000000000010301008c551fabc6e6e00c609c3f0313257ad7e835643c000000000002540be39c000000000000006400000001070062007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b53001450cfe0a974b19c7564411fa9d075d28170a76a8f9f40158be8fa86bfd391e389a7f49e243680947006569dff74dcc09721dd861b8977cf66343a4c6c9fab06"; let tx_size = 167; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -653,7 +653,7 @@ fn remove_stake() { // Test serialization and deserialization. let tx = make_remove_stake_tx(false); - let tx_hex = "0100000000000000000000000000000000000000010301018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000003e8000000000000006400000001040062007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b5300008cddeff67b3d9703b5d5ec1a6fe5165b27135fa7f14151fb43dd9c4948a76528c417ec13871779df77d4373d237c04d09b705962b812817d5f97d8109cdf0a"; + let tx_hex = "0100000000000000000000000000000000000000010301018c551fabc6e6e00c609c3f0313257ad7e835643c000000000000000003e8000000000000006400000001070062007451b039e2f3fcafc3be7c6bd9e01fbc072c956a2b95a335cfb3cd3702335b5300cdb476051adbdb069a880d475aefc327f91e760abd588317bc801b2b17292e26197bfb980afcd3d3351d21a48c5e6edd00a215cff9d4bd9b881099b4749ee100"; let tx_size = 167; let mut ser_tx: Vec = Vec::with_capacity(tx_size); @@ -700,7 +700,7 @@ fn make_incoming_tx(data: IncomingStakingTransactionData, value: u64) -> Transac value.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), _ => Transaction::new_signaling( Address::from_any_str(STAKER_ADDRESS).unwrap(), @@ -710,7 +710,7 @@ fn make_incoming_tx(data: IncomingStakingTransactionData, value: u64) -> Transac 100.try_into().unwrap(), data.serialize_to_vec(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), } } @@ -762,7 +762,7 @@ fn make_delete_validator_tx(value: u64, wrong_sig: bool) -> Transaction { value.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let private_key = @@ -799,7 +799,7 @@ fn make_remove_stake_tx(wrong_sig: bool) -> Transaction { 1000.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let private_key = diff --git a/test-utils/src/performance/history-store/main.rs b/test-utils/src/performance/history-store/main.rs index 6af0fb9b87..c2eee4103f 100644 --- a/test-utils/src/performance/history-store/main.rs +++ b/test-utils/src/performance/history-store/main.rs @@ -52,7 +52,7 @@ fn create_transaction(block: u32, value: u64) -> HistoricTransaction { Coin::from_u64_unchecked(value), Coin::from_u64_unchecked(0), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), )), } diff --git a/transaction-builder/tests/htlc_contract.rs b/transaction-builder/tests/htlc_contract.rs index d75d20cc23..62a444b22e 100644 --- a/transaction-builder/tests/htlc_contract.rs +++ b/transaction-builder/tests/htlc_contract.rs @@ -36,7 +36,7 @@ fn it_can_create_creation_transaction() { 100.try_into().unwrap(), 0.try_into().unwrap(), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let mut htlc_builder = Recipient::new_htlc_builder(); @@ -52,7 +52,7 @@ fn it_can_create_creation_transaction() { .with_recipient(htlc_builder.generate().unwrap()) .with_value(100.try_into().unwrap()) .with_validity_start_height(0) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let result = builder .generate() .expect("Builder should be able to create transaction"); @@ -100,7 +100,7 @@ fn prepare_outgoing_transaction() -> ( 1000.try_into().unwrap(), 0.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let sender_signature = sender_key_pair.sign(&tx.serialize_content()[..]); @@ -142,7 +142,7 @@ fn it_can_create_regular_transfer() { .with_value(1000.try_into().unwrap()) .with_fee(0.try_into().unwrap()) .with_validity_start_height(1) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); @@ -182,7 +182,7 @@ fn it_can_create_early_resolve() { .with_value(1000.try_into().unwrap()) .with_fee(0.try_into().unwrap()) .with_validity_start_height(1) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); @@ -215,7 +215,7 @@ fn it_can_create_timeout_resolve() { .with_value(1000.try_into().unwrap()) .with_fee(0.try_into().unwrap()) .with_validity_start_height(1) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); diff --git a/transaction-builder/tests/staking_contract.rs b/transaction-builder/tests/staking_contract.rs index f26260427e..2b2feb1740 100644 --- a/transaction-builder/tests/staking_contract.rs +++ b/transaction-builder/tests/staking_contract.rs @@ -40,7 +40,7 @@ fn it_can_create_staker_transactions() { 100_000_000.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -61,7 +61,7 @@ fn it_can_create_staker_transactions() { 100_000_000.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -85,7 +85,7 @@ fn it_can_create_staker_transactions() { false, 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -98,7 +98,7 @@ fn it_can_create_staker_transactions() { false, 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -113,7 +113,7 @@ fn it_can_create_staker_transactions() { 150_000_000.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -132,7 +132,7 @@ fn it_can_fail_creating_staker_transactions() { 0.try_into().unwrap(), // InvalidValue 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .err(); @@ -172,7 +172,7 @@ fn it_can_create_validator_transactions() { Some(Blake2bHash::default()), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -201,7 +201,7 @@ fn it_can_create_validator_transactions() { None, 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); assert_eq!(tx, tx2); @@ -222,7 +222,7 @@ fn it_can_create_validator_transactions() { &key_pair, 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); assert_eq!(tx, tx2); @@ -243,7 +243,7 @@ fn it_can_create_validator_transactions() { &key_pair, 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); assert_eq!(tx, tx2); @@ -257,7 +257,7 @@ fn it_can_create_validator_transactions() { 100.try_into().unwrap(), Coin::from_u64_unchecked(Policy::VALIDATOR_DEPOSIT - 100), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ) .unwrap(); @@ -278,7 +278,7 @@ fn make_incoming_transaction(data: IncomingStakingTransactionData, value: u64) - value.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), _ => Transaction::new_signaling( Address::from_any_str(ADDRESS).unwrap(), @@ -288,7 +288,7 @@ fn make_incoming_transaction(data: IncomingStakingTransactionData, value: u64) - 100.try_into().unwrap(), data.serialize_to_vec(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ), } } @@ -322,7 +322,7 @@ fn make_remove_stake_transaction(key_pair: &KeyPair, value: u64) -> Transaction value.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); tx.proof = key_pair.sign(&tx.serialize_content()).serialize_to_vec(); tx @@ -340,7 +340,7 @@ fn make_delete_transaction(key_pair: &KeyPair, value: u64) -> Transaction { value.try_into().unwrap(), 100.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); tx.proof = key_pair.sign(&tx.serialize_content()).serialize_to_vec(); tx diff --git a/transaction-builder/tests/vesting_contract.rs b/transaction-builder/tests/vesting_contract.rs index 3be97af29a..1c593a7d16 100644 --- a/transaction-builder/tests/vesting_contract.rs +++ b/transaction-builder/tests/vesting_contract.rs @@ -24,7 +24,7 @@ fn it_can_create_creation_transaction() { 100.try_into().unwrap(), 0.try_into().unwrap(), 0, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); // Valid @@ -38,7 +38,7 @@ fn it_can_create_creation_transaction() { .with_recipient(recipient.generate().unwrap()) .with_value(100.try_into().unwrap()) .with_validity_start_height(0) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); @@ -68,7 +68,7 @@ fn it_can_create_creation_transaction() { .with_recipient(recipient.generate().unwrap()) .with_value(100.try_into().unwrap()) .with_validity_start_height(0) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); @@ -98,7 +98,7 @@ fn it_can_create_creation_transaction() { .with_recipient(recipient.generate().unwrap()) .with_value(100.try_into().unwrap()) .with_validity_start_height(0) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); @@ -120,7 +120,7 @@ fn it_can_create_outgoing_transactions() { 1.try_into().unwrap(), 1000.try_into().unwrap(), 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); tx.sender_type = AccountType::Vesting; @@ -135,7 +135,7 @@ fn it_can_create_outgoing_transactions() { .with_value(1.try_into().unwrap()) .with_fee(1000.try_into().unwrap()) .with_validity_start_height(1) - .with_network_id(NetworkId::Dummy); + .with_network_id(NetworkId::UnitAlbatross); let proof_builder = builder .generate() .expect("Builder should be able to create transaction"); diff --git a/wallet/tests/multisig.rs b/wallet/tests/multisig.rs index bb039c10e3..9e61f29a01 100644 --- a/wallet/tests/multisig.rs +++ b/wallet/tests/multisig.rs @@ -36,7 +36,7 @@ pub fn it_can_create_valid_transactions() { Coin::from_u64_unchecked(1), Coin::ZERO, 1, - NetworkId::Dummy, + NetworkId::UnitAlbatross, ); let data1 = CommitmentsBuilder::with_private_commitments(kp1.public, commitment_pairs1) @@ -73,7 +73,7 @@ pub fn it_can_create_valid_transactions() { ) .unwrap(); - assert!(tx.verify(NetworkId::Dummy).is_ok()) + assert!(tx.verify(NetworkId::UnitAlbatross).is_ok()) } #[test]