Skip to content

Commit

Permalink
debug: sign attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Dec 21, 2023
1 parent 6191d6b commit c7c9c20
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions attestation/attestservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,17 +488,18 @@ func (s *AttestService) doStateSignAttestation() {
lastCommitmentHash = chainhash.Hash{}
}

log.Infof("state update %s \n", lastCommitmentHash.String())
// sign attestation with combined sigs and last commitment
signedTx, signErr := s.attester.signAttestation(&s.attestation.Tx, sigs, lastCommitmentHash)
log.Infoln("sign")
if s.setFailure(signErr) {
log.Infof("********** signer failure. resubscribing to signers...")
s.signer.ReSubscribe()
return // will rebound to init
}
log.Infoln("sign success")
s.attestation.Tx = *signedTx
s.attestation.Txid = s.attestation.Tx.TxHash()
// signedTx, signErr := s.attester.signAttestation(&s.attestation.Tx, sigs, lastCommitmentHash)
// log.Infoln("sign")
// if s.setFailure(signErr) {
// log.Infof("********** signer failure. resubscribing to signers...")
// s.signer.ReSubscribe()
// return // will rebound to init
// }
// log.Infoln("sign success")
// s.attestation.Tx = *signedTx
// s.attestation.Txid = s.attestation.Tx.TxHash()

s.state = AStatePreSendStore // update attestation state
log.Infof("state update %d \n", s.state)
Expand Down

0 comments on commit c7c9c20

Please sign in to comment.