Skip to content

Commit

Permalink
chore: debug test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Mar 19, 2024
1 parent c403601 commit 4a7120c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion attestation/attestclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ func (w *AttestClient) getUnconfirmedTxFromCommitments(latestAttestations []mode
if err != nil {
return false, chainhash.Hash{}, err
}

fmt.Printf("mempool %v", mempool)
fmt.Printf("latest Attestaions %v", latestAttestations)
for _, attest := range latestAttestations {
for _, mem := range mempool {
if attest.Txid.IsEqual(mem) {
Expand Down
5 changes: 3 additions & 2 deletions attestation/attestservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,13 @@ func (s *AttestService) stateInitWalletFailure() {
// - If no attestation found, check last unconfirmed from db
func (s *AttestService) doStateInit() {
log.Infoln("*AttestService* INITIATING ATTESTATION PROCESS")
latestCommitments, err := s.server.dbInterface.GetUnconfirmedAttestations();
latestAttestations, err := s.server.dbInterface.GetUnconfirmedAttestations()
log.Infof("latest commitment %v", latestAttestations)
if err != nil {
return
}
// find the state of the attestation
unconfirmed, unconfirmedTxid, unconfirmedErr := s.attester.getUnconfirmedTxFromCommitments(latestCommitments)
unconfirmed, unconfirmedTxid, unconfirmedErr := s.attester.getUnconfirmedTxFromCommitments(latestAttestations)
if s.setFailure(unconfirmedErr) {
return // will rebound to init
} else if unconfirmed { // check mempool for unconfirmed - added check in case something gets rejected
Expand Down

0 comments on commit 4a7120c

Please sign in to comment.