File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1717 envsubst < ${{ github.workspace }}/.github/workflows/e2e_config/beta-4.toml.template > ${{ github.workspace }}/.github/workflows/e2e_config/beta-4.toml
1818
1919 - name : Run e2e tests with docker
20- run : docker run -v ${{ github.workspace }}/.github/workflows/e2e_config:/etc/e2e_config -e FUEL_CORE_E2E_CONFIG='/etc/e2e_config/beta-4.toml' ghcr.io/fuellabs/fuel-core-e2e-client:v0.20.7 ./fuel-core-e2e-client -- alice
20+ run : docker run -v ${{ github.workspace }}/.github/workflows/e2e_config:/etc/e2e_config -e FUEL_CORE_E2E_CONFIG='/etc/e2e_config/beta-4.toml' ghcr.io/fuellabs/fuel-core-e2e-client:sha-ccba276 ./fuel-core-e2e-client -- alice
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99Description of the upcoming release here.
1010
1111### Added
12-
12+ - [ # 1449 ] ( https://github.com/FuelLabs/fuel-core/pull/1449 ) : fix coin pagination in e2e test client
1313- [ #1447 ] ( https://github.com/FuelLabs/fuel-core/pull/1447 ) : Add timeout for continuous e2e tests
1414- [ #1444 ] ( https://github.com/FuelLabs/fuel-core/pull/1444 ) : Add "sanity" benchmarks for memory opcodes.
1515- [ #1437 ] ( https://github.com/FuelLabs/fuel-core/pull/1437 ) : Add some transaction throughput tests for basic transfers.
Original file line number Diff line number Diff line change @@ -107,26 +107,33 @@ impl Wallet {
107107 pub async fn owns_coin ( & self , utxo_id : UtxoId ) -> anyhow:: Result < bool > {
108108 let mut first_page = true ;
109109 let mut results = vec ! [ ] ;
110+ let mut cursor = None ;
110111
111112 while first_page || !results. is_empty ( ) {
112113 first_page = false ;
113- results = self
114+ let response = self
114115 . client
115116 . coins (
116117 & self . address ,
117118 None ,
118119 PaginationRequest {
119- cursor : None ,
120+ cursor,
120121 results : 100 ,
121122 direction : PageDirection :: Forward ,
122123 } ,
123124 )
124- . await ?
125- . results ;
125+ . await ?;
126+ results = response . results ;
126127 // check if page has the utxos we're looking for
127128 if results. iter ( ) . any ( |coin| coin. utxo_id == utxo_id) {
128129 return Ok ( true )
129130 }
131+ // otherwise update the cursor to check the next page
132+ if response. has_next_page {
133+ cursor = response. cursor ;
134+ } else {
135+ break
136+ }
130137 }
131138
132139 Ok ( false )
You can’t perform that action at this time.
0 commit comments