Skip to content

Commit 08764c1

Browse files
authored
(rollback) cherry-pick: include system vault address (#102)
1 parent d7a13a3 commit 08764c1

File tree

2 files changed

+10
-20
lines changed
  • precompiles/btc-registration-pool/src
  • runtime/mainnet/src

2 files changed

+10
-20
lines changed

precompiles/btc-registration-pool/src/lib.rs

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -213,27 +213,17 @@ where
213213
) -> EvmResult<Vec<BitcoinAddressString>> {
214214
handle.record_cost(RuntimeHelper::<Runtime>::db_read_gas_cost())?;
215215

216-
let target_round = Self::target_round(pool_round);
217-
let mut vault_addresses: Vec<BitcoinAddressString> =
218-
pallet_btc_registration_pool::RegistrationPool::<Runtime>::iter_prefix(target_round)
219-
.filter_map(|(_, relay_target)| match relay_target.vault.address {
220-
AddressState::Pending => None,
221-
AddressState::Generated(address) => {
222-
Some(BitcoinAddressString::from(address.into_inner()))
223-
},
224-
})
225-
.collect();
226-
// add system vault if it exists
227-
if let Some(system_vault) =
228-
pallet_btc_registration_pool::SystemVault::<Runtime>::get(target_round)
229-
{
230-
match system_vault.address {
231-
AddressState::Pending => (),
216+
let vault_addresses: Vec<BitcoinAddressString> =
217+
pallet_btc_registration_pool::RegistrationPool::<Runtime>::iter_prefix(
218+
Self::target_round(pool_round),
219+
)
220+
.filter_map(|(_, relay_target)| match relay_target.vault.address {
221+
AddressState::Pending => None,
232222
AddressState::Generated(address) => {
233-
vault_addresses.push(BitcoinAddressString::from(address.into_inner()));
223+
Some(BitcoinAddressString::from(address.into_inner()))
234224
},
235-
}
236-
}
225+
})
226+
.collect();
237227

238228
Ok(vault_addresses)
239229
}

runtime/mainnet/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
145145
// The version of the authorship interface.
146146
authoring_version: 1,
147147
// The version of the runtime spec.
148-
spec_version: 2025,
148+
spec_version: 2026,
149149
// The version of the implementation of the spec.
150150
impl_version: 1,
151151
// A list of supported runtime APIs along with their versions.

0 commit comments

Comments
 (0)