core: move basic chain creation into a package of its own
This allows to reuse it across different packages. testchain can't be used because of circular dependencies. Init() is not changed except for filepath.Join() use instead of direct string appends which is a better approach anyway. rootpath is required because current directory will change from package to package.
This commit is contained in:
parent
8673d2a79c
commit
c2b3ee3d8e
17 changed files with 260 additions and 235 deletions
7
internal/basicchain/testdata/verify_args/verification_with_args_contract.go
vendored
Normal file
7
internal/basicchain/testdata/verify_args/verification_with_args_contract.go
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
package verify_args
|
||||
|
||||
// Verify is a verification contract method which takes several arguments.
|
||||
func Verify(argString string, argInt int, argBool bool) bool {
|
||||
isOK := argString == "good_string" || argInt == 5 || argBool == true
|
||||
return isOK
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue