Page MenuHomePhabricator

[ecash-wallet] Remove consumed postage utxos in addFuelAndSign
ClosedPublic

Authored by bytesofman on Wed, Nov 12, 17:12.

Details

Summary

Match the same API from build()

Note buildPostage does not update the utxo set, because it is not necessarily possible to know the txid and the change utxos that go back to the postage wallet.

However, we should do this for the fuel wallet in addFuelAndSign, because in this case we know that there are only consumed utxos and no change utxos. There are significant server speed and resource improvements available for postage payment servers with this update.

Test Plan

npm test

Event Timeline

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56574'
Triggered 2025-11-12 17:12:10 by 'Phabricator Staging (phabricator-staging)'
Started 2025-11-12 17:12:19 on agent 'N/A'
Finished 2025-11-12 17:12:19 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): 'b9a0c5cff6639d3280166ec457c04a665a7be74e' (branch: 'refs/tags/phabricator/diff/56574', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1012809 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[17:12:10]W: bt15 (8s)
[17:12:10]i: TeamCity server version is 2025.03.1 (build 186125)
[17:12:10] : Finalize build settings
[17:12:10] : Collecting changes in 2 VCS roots
[17:12:10] :	 [Collecting changes in 2 VCS roots] VCS Root details
[17:12:10] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[17:12:10] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[17:12:10]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (7s)
[17:12:10]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper9986062383869719183.sh ls-remote origin
[17:12:10]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (7s)
[17:12:10]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper8821338040508814143.sh ls-remote origin
[17:12:10]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:12:10]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': phabricator-ssh-exec: Unable to establish a connection to any database host (while trying "reviews_bitcoinabc_user"). All masters and replicas are completely unreachable.
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': 
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': AphrontConnectionQueryException: Attempt to connect to phabricator@127.0.0.1 failed with error #1040: Too many connections.
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': fatal: Could not read from remote repository.
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': 
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Please make sure you have the correct access rights
[17:12:11]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': and the repository exists.
[17:12:12]i: Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[17:12:18]i: Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[17:12:18]i: Will collect changes for 'Bitcoin ABC Staging' starting from revision 80ea45545085d18646e91339394e04b4ef365bd8
[17:12:18] : Compute revision for 'Bitcoin ABC Staging'
[17:12:18] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: b9a0c5cff6639d3280166ec457c04a665a7be74e
[17:12:18]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86986
[17:12:18] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: b9a0c5cff6639d3280166ec457c04a665a7be74e
[17:12:19]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

use new function in old method, test it

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56575'
Triggered 2025-11-12 17:18:22 by 'Phabricator Staging (phabricator-staging)'
Started 2025-11-12 17:18:23 on agent 'N/A'
Finished 2025-11-12 17:18:23 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): 'N/A' (checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1012813 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[17:18:22]W: bt15 (1s)
[17:18:22]i: TeamCity server version is 2025.03.1 (build 186125)
[17:18:22] : Finalize build settings
[17:18:22] : Collecting changes in 2 VCS roots
[17:18:22] :	 [Collecting changes in 2 VCS roots] VCS Root details
[17:18:22] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[17:18:22] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[17:18:22]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (running for 1s)
[17:18:22]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (running for 1s)
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper6383432751819937167.sh ls-remote origin
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper4635098447726358903.sh ls-remote origin
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': vcs@reviews.bitcoinabc.org: Permission denied (publickey,keyboard-interactive).
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': fatal: Could not read from remote repository.
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': 
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Please make sure you have the correct access rights
[17:18:22]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': and the repository exists.
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': phabricator-ssh-exec: Unable to establish a connection to any database host (while trying "reviews_bitcoinabc_project"). All masters and replicas are completely unreachable.
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': 
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': AphrontConnectionQueryException: Attempt to connect to phabricator@127.0.0.1 failed with error #1040: Too many connections.
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': fatal: Could not read from remote repository.
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': 
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Please make sure you have the correct access rights
[17:18:23]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': and the repository exists.
[17:18:23]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  47% (11/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  52% (12/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  56% (13/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  60% (14/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  65% (15/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  69% (16/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  73% (17/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  78% (18/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  82% (19/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  86% (20/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  91% (21/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects:  95% (22/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects: 100% (23/23)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Counting objects: 100% (23/23), done.        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:   8% (1/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  16% (2/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  25% (3/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  33% (4/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  41% (5/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  50% (6/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  58% (7/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  66% (8/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  75% (9/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  83% (10/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects:  91% (11/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects: 100% (12/12)        
[17:18:28]i: VCS root 'Bitcoin ABC Staging': remote: Compressing objects: 100% (12/12), done.        
[17:18:29]i: VCS root 'Bitcoin ABC Staging': remote: Total 12 (delta 8), reused 0 (delta 0), pack-reused 0        
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:   8% (1/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  16% (2/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  25% (3/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  33% (4/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  41% (5/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  50% (6/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  58% (7/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  66% (8/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  75% (9/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  83% (10/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects:  91% (11/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects: 100% (12/12)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Receiving objects: 100% (12/12), 3.51 KiB | 3.51 MiB/s, done.
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:   0% (0/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  12% (1/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  25% (2/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  37% (3/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  50% (4/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  62% (5/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  75% (6/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas:  87% (7/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas: 100% (8/8)
[17:18:29]i: VCS root 'Bitcoin ABC Staging': Resolving deltas: 100% (8/8), completed with 8 local objects.
[17:18:29]i: VCS root 'Bitcoin ABC Staging': From ssh://reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging
[17:18:29]i: VCS root 'Bitcoin ABC Staging':  * [new tag]               phabricator/base/56575 -> phabricator/base/56575
[17:18:29]i: VCS root 'Bitcoin ABC Staging':  * [new tag]               phabricator/diff/56575 -> phabricator/diff/56575
[17:18:30]i: Done collecting changes for 'Bitcoin ABC Staging': 1 changes collected 1 changes persisted, total time: 6s,470ms, persisting time: 6ms
[17:18:30] : Compute revision for 'Bitcoin ABC Staging'
[17:18:30] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 102bc82d844f3a0b85cc6e46876d5fd99bf80f5d
[17:18:30]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86987
[17:18:30] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 102bc82d844f3a0b85cc6e46876d5fd99bf80f5d
[17:18:31]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #N/A, branch 'refs/tags/phabricator/diff/56575'
Triggered 2025-11-12 17:22:35 by 'Phabricator Staging (phabricator-staging)'
Started 2025-11-12 17:22:39 on agent 'N/A'
Finished 2025-11-12 17:22:39 with status FAILURE 'Snapshot dependency failed to start: Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): '102bc82d844f3a0b85cc6e46876d5fd99bf80f5d' (branch: 'refs/tags/phabricator/diff/56575', checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1012827 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[17:22:35]W: bt15 (3s)
[17:22:35]i: TeamCity server version is 2025.03.1 (build 186125)
[17:22:35] : Finalize build settings
[17:22:35] : Collecting changes in 2 VCS roots
[17:22:35] :	 [Collecting changes in 2 VCS roots] VCS Root details
[17:22:35] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[17:22:35] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[17:22:35]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (3s)
[17:22:35]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (3s)
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper9163429245855748163.sh ls-remote origin
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper11475523345683144431.sh ls-remote origin
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': vcs@reviews.bitcoinabc.org: Permission denied (publickey,keyboard-interactive).
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': fatal: Could not read from remote repository.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': 
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Please make sure you have the correct access rights
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': and the repository exists.
[17:22:37]i: Waiting for completion of current operations for the VCS root 'Bitcoin ABC Staging'
[17:22:39]i: Detecting changes in VCS root 'Bitcoin ABC Staging' (used in 'Diff Testing', 'Staging Checkout Dummy')
[17:22:39]i: Will collect changes for 'Bitcoin ABC Staging' starting from revision 80ea45545085d18646e91339394e04b4ef365bd8
[17:22:39] : Compute revision for 'Bitcoin ABC Staging'
[17:22:39] :	 [Compute revision for 'Bitcoin ABC Staging'] Upper limit revision: 102bc82d844f3a0b85cc6e46876d5fd99bf80f5d
[17:22:39]i:	 [Compute revision for 'Bitcoin ABC Staging'] MaxModId = 86987
[17:22:39] :	 [Compute revision for 'Bitcoin ABC Staging'] Computed revision: 102bc82d844f3a0b85cc6e46876d5fd99bf80f5d
[17:22:39]W: Build was removed from the queue with comment: This build has not been started because some of the builds it depends on failed to start

Tail of the build log:

Build 'Bitcoin ABC Diffs / Diff Testing' #103337, branch 'refs/tags/phabricator/diff/56575'
Triggered 2025-11-12 17:22:35 by 'Phabricator Staging (phabricator-staging)'
Started 2025-11-12 17:22:46 on agent 'buildagent7'
Finished 2025-11-12 17:22:46 with status FAILURE 'Unable to collect changes'
VCS revisions: 'BitcoinABC_BitcoinAbcStaging' (Git, instance id 22): 'N/A' (checkout rules: '+:. => ./bitcoin-abc')
TeamCity URL https://build.bitcoinabc.org/buildConfiguration/BitcoinABC_BitcoinAbcStaging/1012825 
TeamCity server version is 2025.03.1 (build 186125), server timezone: GMT (UTC)

[17:22:35]E: bt15 (11s)
[17:22:35]i: TeamCity server version is 2025.03.1 (build 186125)
[17:22:35] : Finalize build settings
[17:22:35] : Collecting changes in 2 VCS roots
[17:22:35] :	 [Collecting changes in 2 VCS roots] VCS Root details
[17:22:35] :		 [VCS Root details] "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[17:22:35] :		 [VCS Root details] "abc-infrastructure" {instance id=24, parent internal id=7, parent id=AutomatedDeployments_BitcoinAbcDeveloperTools_AbcInfrastructure, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/infrastructure.git#refs/heads/master"}
[17:22:35]i: Loading current repository state for VCS root 'Bitcoin ABC Staging' (running for 11s)
[17:22:35]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] VCS root 'Bitcoin ABC Staging': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper11464280306438287972.sh ls-remote origin
[17:22:35]i:	 [Loading current repository state for VCS root 'Bitcoin ABC Staging'] Loading current repository state for VCS root 'abc-infrastructure' (running for 11s)
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper6739324226852108355.sh ls-remote origin
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:22:35]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'abc-infrastructure': Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': phabricator-ssh-exec: Unable to establish a connection to any database host (while trying "reviews_bitcoinabc_repository"). All masters and replicas are completely unreachable.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': 
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': AphrontConnectionQueryException: Attempt to connect to phabricator@127.0.0.1 failed with error #1040: Too many connections.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': fatal: Could not read from remote repository.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': 
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': Please make sure you have the correct access rights
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] VCS root 'Bitcoin ABC Staging': and the repository exists.
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] Detecting changes in VCS root 'abc-infrastructure' (used in 'Bitcoin-ABC Infra Checkout', 'Extract Electrum ABC from ABC' and 5 other configurations)
[17:22:36]i:		 [Loading current repository state for VCS root 'abc-infrastructure'] Will collect changes for 'abc-infrastructure' starting from revision 4c711788e5f19436bba5cdcd07805789a56d5d5a
[17:22:36] : Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout
[17:22:36] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Upper limit revision: 4c711788e5f19436bba5cdcd07805789a56d5d5a
[17:22:36]i:	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] MaxModId = 86949
[17:22:36] :	 [Compute revision for 'abc-infrastructure' in Automated Deployments / Bitcoin ABC Infra / Bitcoin-ABC Infra Checkout] Computed revision: 4c711788e5f19436bba5cdcd07805789a56d5d5a
[17:22:46] : The build is removed from the queue to be prepared for the start
[17:22:46]E: Failed to collect changes, error: git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper11464280306438287972.sh ls-remote origin command failed.
exit code: 128
stderr: Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
phabricator-ssh-exec: Unable to establish a connection to any database host (while trying "reviews_bitcoinabc_repository"). All masters and replicas are completely unreachable.

AphrontConnectionQueryException: Attempt to connect to phabricator@127.0.0.1 failed with error #1040: Too many connections.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists., VCS root: "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[17:22:46]E: Failed to collect changes, error: git -c credential.helper= -c credential.helper=/opt/teamcity/temp/credHelper11464280306438287972.sh ls-remote origin command failed.
exit code: 128
stderr: Warning: Permanently added '[reviews.bitcoinabc.org]:2221' (ED25519) to the list of known hosts.
phabricator-ssh-exec: Unable to establish a connection to any database host (while trying "reviews_bitcoinabc_repository"). All masters and replicas are completely unreachable.

AphrontConnectionQueryException: Attempt to connect to phabricator@127.0.0.1 failed with error #1040: Too many connections.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists., VCS root: "Bitcoin ABC Staging" {instance id=22, parent internal id=3, parent id=BitcoinABC_BitcoinAbcStaging, description: "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc-staging.git#refs/heads/master"}
[17:22:46] : Build finished
Fabien requested changes to this revision.Wed, Nov 12, 19:53
Fabien added a subscriber: Fabien.
Fabien added inline comments.
modules/ecash-wallet/src/wallet.ts
4339

It's a bit of a shame this function is public but only for testing

4346–4353

This is O(n) instead of O(2n)

This revision now requires changes to proceed.Wed, Nov 12, 19:53
bytesofman added inline comments.
modules/ecash-wallet/src/wallet.ts
4339

we could make it a private method easily enough

imo it is safe to export, tho questionable if anyone would use it, because the params are strongly typed and also quite unique to ecash libraries

the advantage gained by testing it is probably not so great though, as it is pretty effectively tested by the integration tests. I'm open to losing the tests and making it a private method.

4346–4353

nice much better. NB tho i had to use if (utxoIndex >= 0) and not > 0, as sometimes the index is found and is 0

bytesofman marked 2 inline comments as done.

improve removeSpentUtxos

Fabien added inline comments.
modules/ecash-wallet/src/wallet.ts
4350 ↗(On Diff #56576)

good catch

This revision is now accepted and ready to land.Wed, Nov 12, 21:55