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

add preExecute in tx pool for non-consensus node #396

Merged
merged 3 commits into from
Jun 25, 2018

Conversation

lightshine001
Copy link
Contributor

No description provided.

"ConsensusType":"solo"
{
"SeedList": [
"polaris1.ont.io:20338",
Copy link
Contributor

Choose a reason for hiding this comment

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

this config file can be removed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@@ -64,6 +64,10 @@ type TxActor struct {
func (ta *TxActor) handleTransaction(sender tc.SenderType, self *actor.PID,
txn *tx.Transaction) {
ta.server.increaseStats(tc.RcvStats)
if len(txn.ToArray()) > 1024*1024 {
Copy link
Contributor

Choose a reason for hiding this comment

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

define it as a constant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

…on size to prevent DOS attacks and check balance cover gas cost

Signed-off-by: liupan@onchain.com <liupan@onchain.com>
txn.Hash(), err)
}
if !isBalanceEnough(txn.Payer, result.Gas) {
return
Copy link
Contributor

Choose a reason for hiding this comment

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

log info 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.

Done

liupan@onchain.com added 2 commits June 25, 2018 17:46
Signed-off-by: liupan@onchain.com <liupan@onchain.com>
Signed-off-by: liupan@onchain.com <liupan@onchain.com>
@laizy laizy merged commit bdd5cf9 into ontio:master Jun 25, 2018
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.

None yet

3 participants