Fixed tests
This commit is contained in:
parent
0f93da400a
commit
d3a159ad3d
@ -91,7 +91,7 @@ func TestRun4(t *testing.T) {
|
|||||||
Exit()
|
Exit()
|
||||||
`), false)
|
`), false)
|
||||||
script := ethutil.Assemble(asm...)
|
script := ethutil.Assemble(asm...)
|
||||||
tx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), script, nil)
|
tx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), ethutil.Big("100"), script, nil)
|
||||||
addr := tx.Hash()[12:]
|
addr := tx.Hash()[12:]
|
||||||
contract := MakeContract(tx, state)
|
contract := MakeContract(tx, state)
|
||||||
state.UpdateStateObject(contract)
|
state.UpdateStateObject(contract)
|
||||||
@ -133,7 +133,7 @@ func TestRun4(t *testing.T) {
|
|||||||
fmt.Println(asm)
|
fmt.Println(asm)
|
||||||
|
|
||||||
callerScript := ethutil.Assemble(asm...)
|
callerScript := ethutil.Assemble(asm...)
|
||||||
callerTx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), callerScript, nil)
|
callerTx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), ethutil.Big("100"), callerScript, nil)
|
||||||
|
|
||||||
// Contract addr as test address
|
// Contract addr as test address
|
||||||
gas := big.NewInt(1000)
|
gas := big.NewInt(1000)
|
||||||
@ -148,7 +148,7 @@ func TestRun4(t *testing.T) {
|
|||||||
fmt.Println("account.Amount =", account.Amount)
|
fmt.Println("account.Amount =", account.Amount)
|
||||||
callerClosure := NewClosure(account, c, c.script, state, gas, gasPrice, big.NewInt(0))
|
callerClosure := NewClosure(account, c, c.script, state, gas, gasPrice, big.NewInt(0))
|
||||||
|
|
||||||
vm := NewVm(state, RuntimeVars{
|
vm := NewVm(state, nil, RuntimeVars{
|
||||||
Origin: account.Address(),
|
Origin: account.Address(),
|
||||||
BlockNumber: 1,
|
BlockNumber: 1,
|
||||||
PrevHash: ethutil.FromHex("5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"),
|
PrevHash: ethutil.FromHex("5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"),
|
||||||
|
Loading…
Reference in New Issue
Block a user