Merge pull request #1767 from nuttycom/fix/sqlite_pk_i64
Minor fix for sqlite primary key in-memory representation.
This commit is contained in:
commit
4acb6f59f7
|
@ -224,7 +224,7 @@ impl AccountUuid {
|
||||||
/// This is an ephemeral value for efficiently and generically working with accounts in a
|
/// This is an ephemeral value for efficiently and generically working with accounts in a
|
||||||
/// [`WalletDb`]. To reference accounts in external contexts, use [`AccountUuid`].
|
/// [`WalletDb`]. To reference accounts in external contexts, use [`AccountUuid`].
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default, PartialOrd, Ord)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default, PartialOrd, Ord)]
|
||||||
pub(crate) struct AccountRef(u32);
|
pub(crate) struct AccountRef(i64);
|
||||||
|
|
||||||
/// This implementation is retained under `#[cfg(test)]` for pre-AccountUuid testing.
|
/// This implementation is retained under `#[cfg(test)]` for pre-AccountUuid testing.
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub(super) fn insert_initial_transparent_addrs<P: consensus::Parameters>(
|
||||||
":key_scope_external": KeyScope::EXTERNAL.encode()
|
":key_scope_external": KeyScope::EXTERNAL.encode()
|
||||||
])?;
|
])?;
|
||||||
while let Some(row) = min_addr_rows.next()? {
|
while let Some(row) = min_addr_rows.next()? {
|
||||||
let account_id = AccountRef(row.get::<_, u32>("account_id")?);
|
let account_id = AccountRef(row.get("account_id")?);
|
||||||
|
|
||||||
let min_transparent_idx = row
|
let min_transparent_idx = row
|
||||||
.get::<_, Option<u32>>("transparent_child_index")?
|
.get::<_, Option<u32>>("transparent_child_index")?
|
||||||
|
@ -716,7 +716,7 @@ impl<P: consensus::Parameters, C: Clock, R: RngCore> RusqliteMigration for Migra
|
||||||
generate_gap_addresses(
|
generate_gap_addresses(
|
||||||
conn,
|
conn,
|
||||||
&self.params,
|
&self.params,
|
||||||
AccountRef(account_id.try_into().unwrap()),
|
AccountRef(account_id),
|
||||||
key_scope,
|
key_scope,
|
||||||
&GapLimits::default(),
|
&GapLimits::default(),
|
||||||
UnifiedAddressRequest::unsafe_custom(Allow, Allow, Require),
|
UnifiedAddressRequest::unsafe_custom(Allow, Allow, Require),
|
||||||
|
|
Loading…
Reference in New Issue