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

Fix: Binary Maths #82

Merged
merged 15 commits into from
Nov 16, 2021
9 changes: 9 additions & 0 deletions bscript/interpreter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package interpreter
import "math"

type config interface {
AfterGenesis() bool
MaxOps() int
MaxStackSize() int
MaxScriptSize() int
Expand All @@ -24,6 +25,14 @@ const (
type beforeGenesisConfig struct{}
type afterGenesisConfig struct{}

func (a *afterGenesisConfig) AfterGenesis() bool {
return true
}

func (b *beforeGenesisConfig) AfterGenesis() bool {
return false
}

func (a *afterGenesisConfig) MaxStackSize() int {
return math.MaxInt32
}
Expand Down
Loading