Skip to content

fix blockchain on transaction array logic#2146

Merged
erikzhang merged 7 commits intoneo-project:masterfrom
Qiao-Jin:fix_onnewtransaction
Dec 16, 2020
Merged

fix blockchain on transaction array logic#2146
erikzhang merged 7 commits intoneo-project:masterfrom
Qiao-Jin:fix_onnewtransaction

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