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

Fix ask Max and Min piece size being reset on reboot #4334

Closed
wants to merge 1 commit into from

Conversation

hsanjuan
Copy link
Contributor

set-ask for max and min piece sizes only takes effects while the miner
runs. During reboot they are reset to the defaults.

This is because during initialization the miner does a "default set ask" with
the purpose of adjusting the MaxPieceSize to the miners sector-size.

However this should only happen if the miner has never adjusted the ask
themselves, that is, SeqNo is 0.

Additionally, handle the case when the ask is nil, in case markets code
decides to not create a default ask during initialization at some point.

`set-ask` for max and min piece sizes only takes effects while the miner
runs. During reboot they are reset to the defaults.

This is because during initialization the miner does a "default set ask" with
the purpose of adjusting the MaxPieceSize to the miners sector-size.

However this should only happen if the miner has never adjusted the ask
themselves, that is, SeqNo is 0.

Additionally, handle the case when the ask is nil, in case markets code
decides to not create a default ask during initialization at some point.
@magik6k
Copy link
Contributor

magik6k commented Oct 14, 2020

More correct fix in #4384

@magik6k magik6k closed this Oct 14, 2020
@hsanjuan
Copy link
Contributor Author

Doesn't account for the

		// TODO: we should be fine with this state, and just say it means 'not actively accepting deals'
		// for now... lets just set a price

but ok.

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