mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-07 15:07:36 +00:00
stackitem: use Bool
item directly
It is always copied. Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
5aff82aef4
commit
cff8b1c24e
6 changed files with 40 additions and 44 deletions
|
@ -103,9 +103,9 @@ func (w *serContext) serialize(item Item) error {
|
|||
data := t.Value().([]byte)
|
||||
w.appendVarUint(uint64(len(data)))
|
||||
w.data = append(w.data, data...)
|
||||
case *Bool:
|
||||
case Bool:
|
||||
w.data = append(w.data, byte(BooleanT))
|
||||
if t.Value().(bool) {
|
||||
if t {
|
||||
w.data = append(w.data, 1)
|
||||
} else {
|
||||
w.data = append(w.data, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue