Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s/VMContext/Context/, and change from an interface with two implement…
…ations to a struct with a lot of optional fields.
- Loading branch information
Bob Glickstein
committed
Mar 23, 2017
1 parent
93fd5e5
commit df6946c
Showing
11 changed files
with
243 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package vm | ||
|
||
// Context contains the execution context for the virtual machine. | ||
// | ||
// By convention, variables of this type have the name context, _not_ | ||
// ctx (to avoid confusion with context.Context). | ||
type Context struct { | ||
VMVersion uint64 | ||
Code []byte | ||
Arguments [][]byte | ||
|
||
TxVersion *uint64 | ||
|
||
BlockHash *[]byte | ||
BlockTimeMS *uint64 | ||
NextConsensusProgram *[]byte | ||
|
||
TxSigHash *[]byte | ||
NumResults *uint64 | ||
AssetID *[]byte | ||
Amount *uint64 | ||
MinTimeMS *uint64 | ||
MaxTimeMS *uint64 | ||
InputRefDataHash *[]byte | ||
TxRefDataHash *[]byte | ||
InputIndex *uint32 | ||
Nonce *[]byte | ||
SpentOutputID *[]byte | ||
|
||
CheckOutput func(index uint64, data []byte, amount uint64, assetID []byte, vmVersion uint64, code []byte) (bool, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.