-
Notifications
You must be signed in to change notification settings - Fork 291
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
Conversation
txnpool/proc/config.json
Outdated
"ConsensusType":"solo" | ||
{ | ||
"SeedList": [ | ||
"polaris1.ont.io:20338", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
e0d79db
to
5dc7532
Compare
txnpool/proc/txnpool_actor.go
Outdated
@@ -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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
txnpool/proc/txnpool_actor.go
Outdated
txn.Hash(), err) | ||
} | ||
if !isBalanceEnough(txn.Payer, result.Gas) { | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log info here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: liupan@onchain.com <liupan@onchain.com>
Signed-off-by: liupan@onchain.com <liupan@onchain.com>
No description provided.