Feature/migrate hidden delegations (#786)

* Remove migration code

* Added function to iterate over delegation of variable type

* Add unit tests

* Refactored some naming and reused mix/gateway functionality

* Borrow bucket instead of move

* Linked with existing delegations function

* Migration of left-over delegations

* Remove unused imports

* Put a gateway test as well, next to the mix one

* Expose queries for all delegations

* Change break point

* Added client side calls to the new queries

* Fix clippy

* Added pagination and read check tests

* Fix gateway test from the last commit

* Test functions for (de)serialization of identity and owner (in)to storage keys

* Add delegation function unit test

* Feature guard import

* Changed UnpackedDelegation from type to struct

* Remove mutable parameter and put start_after in returned value

* Made all delegations into iterator for OOM safety

* Fix clippy

* Add test for delegations iterator size in memory

* Change map with if let for ease of read

* Use DENOM instead of hardcoded value
This commit is contained in:
Bogdan-Ștefan Neacşu
2021-09-30 15:04:33 +03:00
committed by GitHub
parent 12637d93ff
commit 2a98f7482d
13 changed files with 995 additions and 124 deletions
+2 -2
View File
@@ -123,7 +123,7 @@ impl<C> Client<C> {
self.0
.read()
.await
.get_all_nymd_mixnode_delegations(identity)
.get_all_nymd_single_mixnode_delegations(identity)
.await
}
@@ -137,7 +137,7 @@ impl<C> Client<C> {
self.0
.read()
.await
.get_all_nymd_gateway_delegations(identity)
.get_all_nymd_single_gateway_delegations(identity)
.await
}