diff options
author | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-03-26 15:31:56 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:04 +0800 |
commit | b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0 (patch) | |
tree | b9239a6c6642206862ac81de5ba02a5cd419f4d6 /core/vm/sqlvm/schema | |
parent | b46e4244ab17b696674cb3e263fe407e557e8127 (diff) | |
download | dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.tar dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.tar.gz dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.tar.bz2 dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.tar.lz dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.tar.xz dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.tar.zst dexon-b72d7b04bba7ce3a3117b61b15cad3c40e19f1c0.zip |
core: vm: sqlvm: use common.HashLength instead of 32
Keep them consisitent with ast/types.go.
Diffstat (limited to 'core/vm/sqlvm/schema')
-rw-r--r-- | core/vm/sqlvm/schema/schema.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/vm/sqlvm/schema/schema.go b/core/vm/sqlvm/schema/schema.go index f2a46631d..d77cd3855 100644 --- a/core/vm/sqlvm/schema/schema.go +++ b/core/vm/sqlvm/schema/schema.go @@ -6,6 +6,7 @@ import ( "github.com/shopspring/decimal" + "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core/vm/sqlvm/ast" se "github.com/dexon-foundation/dexon/core/vm/sqlvm/errors" "github.com/dexon-foundation/dexon/rlp" @@ -136,7 +137,7 @@ func (t *Table) SetupColumnOffset() { byteOffset := uint8(0) for i, col := range t.Columns { size := col.Type.Size() - if size+byteOffset > 32 { + if size+byteOffset > common.HashLength { slotOffset++ byteOffset = 0 } |