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 blockchain on transaction array logic #2146

Merged
merged 7 commits into from
Dec 16, 2020

Conversation

Qiao-Jin
Copy link
Contributor

shargon
shargon previously approved these changes Dec 14, 2020
@erikzhang
Copy link
Member

erikzhang commented Dec 15, 2020

internal bool LoadPolicy(StoreView snapshot)
{
_maxTxPerBlock = (int)NativeContract.Policy.GetMaxTransactionsPerBlock(snapshot);
long newFeePerByte = NativeContract.Policy.GetFeePerByte(snapshot);
uint newExecFeeFactor = NativeContract.Policy.GetExecFeeFactor(snapshot);
bool policyChanged = newFeePerByte > _feePerByte || newExecFeeFactor > _execFeeFactor;
_feePerByte = newFeePerByte;
_execFeeFactor = newExecFeeFactor;
return policyChanged;
}

I think there is no need to return policyChanged now.

And also we don't need to send the transactions from MemoryPool to Blockchain.

@Qiao-Jin
Copy link
Contributor Author

And also we don't need to send the transactions from MemoryPool to Blockchain.

If there are more transactions in mempool than MaxTransactionPerBlock I think this logic will be executed?

@erikzhang
Copy link
Member

Let's remove policyChanged first.

@Qiao-Jin
Copy link
Contributor Author

@erikzhang Please have a look

@erikzhang erikzhang merged commit 2ab9bc7 into neo-project:master Dec 16, 2020
ShawnYun pushed a commit to ShawnYun/neo that referenced this pull request Jan 8, 2021
cloud8little pushed a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
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