diff --git a/attestation/attestclient.go b/attestation/attestclient.go index 3a0c1d1..2d05abf 100644 --- a/attestation/attestclient.go +++ b/attestation/attestclient.go @@ -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) { diff --git a/attestation/attestservice.go b/attestation/attestservice.go index d36767a..20d85c3 100644 --- a/attestation/attestservice.go +++ b/attestation/attestservice.go @@ -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