Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change AddProof #6712

Merged
merged 8 commits into from
Jan 20, 2025
Merged

Change AddProof #6712

merged 8 commits into from
Jan 20, 2025

Conversation

ssd04
Copy link
Contributor

@ssd04 ssd04 commented Jan 16, 2025

Reasoning behind the pull request

  • Change AddProof to return bool instead of error

Testing procedure

  • TBD

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Jan 16, 2025
@ssd04 ssd04 changed the title change AddProof to return bool if was added of not Change AddProof Jan 16, 2025
if err != nil {
log.Error("failed to add proof", "error", err, "intercepted header hash", interceptedHdr.Hash(), "header type", reflect.TypeOf(interceptedHdr.HeaderHandler()))
}
_ = hip.proofs.AddProof(interceptedHdr.HeaderHandler().GetPreviousProof())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a log.Trace here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

sstanculeanu
sstanculeanu previously approved these changes Jan 16, 2025
Base automatically changed from equivalent-proofs-feat-stabilization to feat/equivalent-messages January 20, 2025 11:41
@AdoAdoAdo AdoAdoAdo dismissed sstanculeanu’s stale review January 20, 2025 11:41

The base branch was changed.

@ssd04 ssd04 marked this pull request as ready for review January 20, 2025 12:22
ssd04 and others added 2 commits January 20, 2025 14:26
Co-authored-by: Sorin Stanculeanu <34831323+sstanculeanu@users.noreply.github.com>
log.Warn("ProofsPool.AddProof", "currHdrHash", currHdrHash, "node", tpn.OwnAccount.Address, "err", err.Error())
wasAdded := tpn.ProofsPool.AddProof(previousProof)
if !wasAdded {
log.Warn("ProofsPool.AddProof not added", "currHdrHash", currHdrHash, "node", tpn.OwnAccount.Address)
}
return err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not return an error here

if p.AddProofCalled != nil {
return p.AddProofCalled(headerProof)
}

return nil
return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, changed

@ssd04 ssd04 merged commit 2a1a875 into feat/equivalent-messages Jan 20, 2025
5 checks passed
@ssd04 ssd04 deleted the add-proof-update branch January 20, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants