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 multi pretransaction support #1026

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lucas7788
Copy link
Contributor

No description provided.

carltraveler and others added 7 commits June 20, 2019 18:39
* 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 {
Copy link
Member

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")
Copy link
Member

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 ?

@@ -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{} {
Copy link
Member

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?

@@ -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{} {
Copy link
Member

Choose a reason for hiding this comment

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

rename as "PreexecuteMultiTransactions" ?

@laizy
Copy link
Contributor

laizy commented Jul 12, 2019

what‘s is the usage scenario?

@laizy laizy force-pushed the master branch 2 times, most recently from 8c8ee59 to dc599e9 Compare July 6, 2021 07:08
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.

5 participants