@@ -123,7 +123,7 @@ pub struct Account<K> {
123
123
account_info : AccountInfo ,
124
124
}
125
125
126
- impl < K : AccountKeyChains > Account < K > {
126
+ impl < K : AccountKeyChains + Sync > Account < K > {
127
127
/// Create a new account by providing a key chain
128
128
pub fn new (
129
129
chain_config : Arc < ChainConfig > ,
@@ -689,7 +689,7 @@ impl<K: AccountKeyChains> Account<K> {
689
689
690
690
pub fn process_send_request_and_sign (
691
691
& mut self ,
692
- db_tx : & mut impl WalletStorageWriteUnlocked ,
692
+ db_tx : & mut impl WalletStorageWriteLocked ,
693
693
request : SendRequest ,
694
694
inputs : SelectedInputs ,
695
695
change_addresses : BTreeMap < Currency , Address < Destination > > ,
@@ -711,7 +711,7 @@ impl<K: AccountKeyChains> Account<K> {
711
711
712
712
fn decommission_stake_pool_impl (
713
713
& mut self ,
714
- db_tx : & mut impl WalletStorageWriteUnlocked ,
714
+ db_tx : & mut impl WalletStorageWriteLocked ,
715
715
pool_id : PoolId ,
716
716
pool_balance : Amount ,
717
717
output_address : Option < Destination > ,
@@ -775,7 +775,7 @@ impl<K: AccountKeyChains> Account<K> {
775
775
776
776
pub fn decommission_stake_pool (
777
777
& mut self ,
778
- db_tx : & mut impl WalletStorageWriteUnlocked ,
778
+ db_tx : & mut impl WalletStorageWriteLocked ,
779
779
pool_id : PoolId ,
780
780
pool_balance : Amount ,
781
781
output_address : Option < Destination > ,
@@ -792,7 +792,7 @@ impl<K: AccountKeyChains> Account<K> {
792
792
793
793
pub fn decommission_stake_pool_request (
794
794
& mut self ,
795
- db_tx : & mut impl WalletStorageWriteUnlocked ,
795
+ db_tx : & mut impl WalletStorageWriteLocked ,
796
796
pool_id : PoolId ,
797
797
pool_balance : Amount ,
798
798
output_address : Option < Destination > ,
@@ -943,7 +943,7 @@ impl<K: AccountKeyChains> Account<K> {
943
943
944
944
pub fn create_htlc_tx (
945
945
& mut self ,
946
- db_tx : & mut impl WalletStorageWriteUnlocked ,
946
+ db_tx : & mut impl WalletStorageWriteLocked ,
947
947
output_value : OutputValue ,
948
948
htlc : HashedTimelockContract ,
949
949
median_time : BlockTimestamp ,
@@ -966,7 +966,7 @@ impl<K: AccountKeyChains> Account<K> {
966
966
967
967
pub fn create_order_tx (
968
968
& mut self ,
969
- db_tx : & mut impl WalletStorageWriteUnlocked ,
969
+ db_tx : & mut impl WalletStorageWriteLocked ,
970
970
ask_value : OutputValue ,
971
971
give_value : OutputValue ,
972
972
conclude_address : Address < Destination > ,
@@ -992,7 +992,7 @@ impl<K: AccountKeyChains> Account<K> {
992
992
993
993
pub fn create_conclude_order_tx (
994
994
& mut self ,
995
- db_tx : & mut impl WalletStorageWriteUnlocked ,
995
+ db_tx : & mut impl WalletStorageWriteLocked ,
996
996
order_id : OrderId ,
997
997
order_info : RpcOrderInfo ,
998
998
output_address : Option < Destination > ,
@@ -1062,7 +1062,7 @@ impl<K: AccountKeyChains> Account<K> {
1062
1062
#[ allow( clippy:: too_many_arguments) ]
1063
1063
pub fn create_fill_order_tx (
1064
1064
& mut self ,
1065
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1065
+ db_tx : & mut impl WalletStorageWriteLocked ,
1066
1066
order_id : OrderId ,
1067
1067
order_info : RpcOrderInfo ,
1068
1068
fill_amount_in_ask_currency : Amount ,
@@ -1151,7 +1151,7 @@ impl<K: AccountKeyChains> Account<K> {
1151
1151
1152
1152
pub fn create_freeze_order_tx (
1153
1153
& mut self ,
1154
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1154
+ db_tx : & mut impl WalletStorageWriteLocked ,
1155
1155
order_id : OrderId ,
1156
1156
order_info : RpcOrderInfo ,
1157
1157
median_time : BlockTimestamp ,
@@ -1176,7 +1176,7 @@ impl<K: AccountKeyChains> Account<K> {
1176
1176
1177
1177
pub fn create_issue_nft_tx (
1178
1178
& mut self ,
1179
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1179
+ db_tx : & mut impl WalletStorageWriteLocked ,
1180
1180
nft_issue_arguments : IssueNftArguments ,
1181
1181
median_time : BlockTimestamp ,
1182
1182
fee_rate : CurrentFeeRate ,
@@ -1241,7 +1241,7 @@ impl<K: AccountKeyChains> Account<K> {
1241
1241
1242
1242
pub fn mint_tokens (
1243
1243
& mut self ,
1244
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1244
+ db_tx : & mut impl WalletStorageWriteLocked ,
1245
1245
token_info : & UnconfirmedTokenInfo ,
1246
1246
address : Address < Destination > ,
1247
1247
amount : Amount ,
@@ -1269,7 +1269,7 @@ impl<K: AccountKeyChains> Account<K> {
1269
1269
1270
1270
pub fn unmint_tokens (
1271
1271
& mut self ,
1272
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1272
+ db_tx : & mut impl WalletStorageWriteLocked ,
1273
1273
token_info : & UnconfirmedTokenInfo ,
1274
1274
amount : Amount ,
1275
1275
median_time : BlockTimestamp ,
@@ -1296,7 +1296,7 @@ impl<K: AccountKeyChains> Account<K> {
1296
1296
1297
1297
pub fn lock_token_supply (
1298
1298
& mut self ,
1299
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1299
+ db_tx : & mut impl WalletStorageWriteLocked ,
1300
1300
token_info : & UnconfirmedTokenInfo ,
1301
1301
median_time : BlockTimestamp ,
1302
1302
fee_rate : CurrentFeeRate ,
@@ -1320,7 +1320,7 @@ impl<K: AccountKeyChains> Account<K> {
1320
1320
1321
1321
pub fn freeze_token (
1322
1322
& mut self ,
1323
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1323
+ db_tx : & mut impl WalletStorageWriteLocked ,
1324
1324
token_info : & UnconfirmedTokenInfo ,
1325
1325
is_token_unfreezable : IsTokenUnfreezable ,
1326
1326
median_time : BlockTimestamp ,
@@ -1347,7 +1347,7 @@ impl<K: AccountKeyChains> Account<K> {
1347
1347
1348
1348
pub fn unfreeze_token (
1349
1349
& mut self ,
1350
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1350
+ db_tx : & mut impl WalletStorageWriteLocked ,
1351
1351
token_info : & UnconfirmedTokenInfo ,
1352
1352
median_time : BlockTimestamp ,
1353
1353
fee_rate : CurrentFeeRate ,
@@ -1371,7 +1371,7 @@ impl<K: AccountKeyChains> Account<K> {
1371
1371
1372
1372
pub fn change_token_authority (
1373
1373
& mut self ,
1374
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1374
+ db_tx : & mut impl WalletStorageWriteLocked ,
1375
1375
token_info : & UnconfirmedTokenInfo ,
1376
1376
address : Address < Destination > ,
1377
1377
median_time : BlockTimestamp ,
@@ -1398,7 +1398,7 @@ impl<K: AccountKeyChains> Account<K> {
1398
1398
1399
1399
pub fn change_token_metadata_uri (
1400
1400
& mut self ,
1401
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1401
+ db_tx : & mut impl WalletStorageWriteLocked ,
1402
1402
token_info : & UnconfirmedTokenInfo ,
1403
1403
metadata_uri : Vec < u8 > ,
1404
1404
median_time : BlockTimestamp ,
@@ -1426,7 +1426,7 @@ impl<K: AccountKeyChains> Account<K> {
1426
1426
authority : Destination ,
1427
1427
tx_input : TxInput ,
1428
1428
outputs : Vec < TxOutput > ,
1429
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1429
+ db_tx : & mut impl WalletStorageWriteLocked ,
1430
1430
median_time : BlockTimestamp ,
1431
1431
fee_rate : CurrentFeeRate ,
1432
1432
) -> Result < SendRequest , WalletError > {
@@ -1448,7 +1448,7 @@ impl<K: AccountKeyChains> Account<K> {
1448
1448
1449
1449
pub fn create_stake_pool_with_vrf_key (
1450
1450
& mut self ,
1451
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1451
+ db_tx : & mut impl WalletStorageWriteLocked ,
1452
1452
mut stake_pool_arguments : StakePoolCreationArguments ,
1453
1453
median_time : BlockTimestamp ,
1454
1454
fee_rate : CurrentFeeRate ,
@@ -1469,7 +1469,7 @@ impl<K: AccountKeyChains> Account<K> {
1469
1469
fn create_stake_pool_impl (
1470
1470
& mut self ,
1471
1471
stake_pool_arguments : StakePoolCreationArguments ,
1472
- db_tx : & mut impl WalletStorageWriteUnlocked ,
1472
+ db_tx : & mut impl WalletStorageWriteLocked ,
1473
1473
vrf_public_key : VRFPublicKey ,
1474
1474
median_time : BlockTimestamp ,
1475
1475
fee_rate : CurrentFeeRate ,
@@ -2424,7 +2424,7 @@ struct PreselectedInputs {
2424
2424
total_input_fees : Amount ,
2425
2425
}
2426
2426
2427
- impl < K : AccountKeyChains + VRFAccountKeyChains > Account < K > {
2427
+ impl < K : AccountKeyChains + VRFAccountKeyChains + Sync > Account < K > {
2428
2428
fn get_vrf_public_key (
2429
2429
& mut self ,
2430
2430
db_tx : & mut impl WalletStorageWriteLocked ,
@@ -2495,7 +2495,7 @@ impl<K: AccountKeyChains + VRFAccountKeyChains> Account<K> {
2495
2495
2496
2496
pub fn create_stake_pool (
2497
2497
& mut self ,
2498
- db_tx : & mut impl WalletStorageWriteUnlocked ,
2498
+ db_tx : & mut impl WalletStorageWriteLocked ,
2499
2499
mut stake_pool_arguments : StakePoolCreationArguments ,
2500
2500
median_time : BlockTimestamp ,
2501
2501
fee_rate : CurrentFeeRate ,
0 commit comments