-
Notifications
You must be signed in to change notification settings - Fork 290
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 multi pretransaction support #1026
base: master
Are you sure you want to change the base?
Conversation
* add block height check when run transaction * finetune the config height * update blockheight, estimate by ((two weeks block) * 2 + current blockheight) * make pickitem support both big.int and bytearray. ensure big.int do not expose to user * update opcode hight constant to future block
* fix Vbft Block serdes * enforce merkleRoot data in Block msg * fix error handlings
return ResponsePack(berr.INVALID_PARAMS) | ||
} | ||
res := make([]interface{}, 0) | ||
for _, param := range paras { |
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.
set a limit on len(paras)
@@ -220,6 +222,8 @@ func (this *restServer) getParams(r *http.Request, url string, req map[string]in | |||
req["Hash"], req["Raw"] = getParam(r, "hash"), r.FormValue("raw") | |||
case POST_RAW_TX: | |||
req["PreExec"] = r.FormValue("preExec") | |||
case POST_MULTI_RAW_TX: | |||
req["PreExec"] = r.FormValue("preExec") |
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.
MULTI_RAW_TX only supports preExec ?
http/base/rpc/interfaces.go
Outdated
@@ -303,6 +303,39 @@ func SendRawTransaction(params []interface{}) map[string]interface{} { | |||
return responseSuccess(hash.ToHexString()) | |||
} | |||
|
|||
// multi pre tx, [tx1, tx2,tx3] | |||
func MultiPreTransaction(params []interface{}) map[string]interface{} { |
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.
why not reuse the above function?
http/base/rest/interfaces.go
Outdated
@@ -287,6 +287,45 @@ func SendRawTransaction(cmd map[string]interface{}) map[string]interface{} { | |||
return resp | |||
} | |||
|
|||
// multi pre tx, [tx1, tx2,tx3] | |||
func MultiPreTransaction(params map[string]interface{}) map[string]interface{} { |
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.
rename as "PreexecuteMultiTransactions" ?
what‘s is the usage scenario? |
8c8ee59
to
dc599e9
Compare
No description provided.