From 1c4ea29ec1f0e122d0184bfe9736280e03f7d519 Mon Sep 17 00:00:00 2001 From: jiangzehua <1092431698@qq.com> Date: Tue, 5 Jul 2022 15:56:44 +0800 Subject: [PATCH 1/4] feat(dpos2.0): add VM related code --- blockchain/blockchain.go | 2 +- blockchain/validation.go | 44 +++ core/transaction/transaction.go | 7 + core/transaction/transactionchecker.go | 7 + core/types/interfaces/basetransaction.go | 2 + vm/common.go | 372 +++++++++++++++++++++++ vm/common_test.go | 16 + vm/crypto_ecdsa.go | 37 +++ vm/doc.go | 17 ++ vm/errors/errors.go | 15 + vm/execution_context.go | 34 +++ vm/execution_engine.go | 211 +++++++++++++ vm/func_arithmetic.go | 95 ++++++ vm/func_array.go | 76 +++++ vm/func_bitwise.go | 34 +++ vm/func_crypto.go | 129 ++++++++ vm/func_flowcontrol.go | 86 ++++++ vm/func_pushdata.go | 41 +++ vm/func_splice.go | 105 +++++++ vm/func_stack.go | 178 +++++++++++ vm/general_service.go | 55 ++++ vm/interfaces/crypto.go | 14 + vm/interfaces/datacontainer.go | 10 + vm/interfaces/general.go | 10 + vm/interfaces/scripttable.go | 10 + vm/interfaces/signable.go | 10 + vm/opcode.go | 3 +- vm/opcode_exec.go | 125 ++++++++ vm/types/array.go | 66 ++++ vm/types/boolean.go | 56 ++++ vm/types/bytearray.go | 65 ++++ vm/types/general.go | 47 +++ vm/types/integer.go | 53 ++++ vm/types/stackitem.go | 19 ++ vm/types/types_test.go | 23 ++ vm/utils/stack.go | 81 +++++ vm/utils/stack_test.go | 51 ++++ vm/utils/vm_reader.go | 112 +++++++ vm/utils/vmreader_test.go | 46 +++ vm/vm_state.go | 17 ++ 40 files changed, 2379 insertions(+), 2 deletions(-) create mode 100755 vm/common.go create mode 100644 vm/common_test.go create mode 100644 vm/crypto_ecdsa.go create mode 100644 vm/doc.go create mode 100755 vm/errors/errors.go create mode 100755 vm/execution_context.go create mode 100755 vm/execution_engine.go create mode 100755 vm/func_arithmetic.go create mode 100755 vm/func_array.go create mode 100755 vm/func_bitwise.go create mode 100755 vm/func_crypto.go create mode 100755 vm/func_flowcontrol.go create mode 100755 vm/func_pushdata.go create mode 100755 vm/func_splice.go create mode 100755 vm/func_stack.go create mode 100644 vm/general_service.go create mode 100755 vm/interfaces/crypto.go create mode 100644 vm/interfaces/datacontainer.go create mode 100644 vm/interfaces/general.go create mode 100755 vm/interfaces/scripttable.go create mode 100755 vm/interfaces/signable.go mode change 100644 => 100755 vm/opcode.go create mode 100644 vm/opcode_exec.go create mode 100644 vm/types/array.go create mode 100644 vm/types/boolean.go create mode 100644 vm/types/bytearray.go create mode 100644 vm/types/general.go create mode 100644 vm/types/integer.go create mode 100644 vm/types/stackitem.go create mode 100644 vm/types/types_test.go create mode 100644 vm/utils/stack.go create mode 100644 vm/utils/stack_test.go create mode 100755 vm/utils/vm_reader.go create mode 100755 vm/utils/vmreader_test.go create mode 100755 vm/vm_state.go diff --git a/blockchain/blockchain.go b/blockchain/blockchain.go index fea9c6c36..967c5dcd9 100644 --- a/blockchain/blockchain.go +++ b/blockchain/blockchain.go @@ -10,7 +10,6 @@ import ( "container/list" "errors" "fmt" - "github.com/elastos/Elastos.ELA/dpos/p2p/peer" "math/big" "os" "path/filepath" @@ -31,6 +30,7 @@ import ( "github.com/elastos/Elastos.ELA/core/types/payload" crstate "github.com/elastos/Elastos.ELA/cr/state" "github.com/elastos/Elastos.ELA/database" + "github.com/elastos/Elastos.ELA/dpos/p2p/peer" "github.com/elastos/Elastos.ELA/dpos/state" "github.com/elastos/Elastos.ELA/events" "github.com/elastos/Elastos.ELA/p2p/msg" diff --git a/blockchain/validation.go b/blockchain/validation.go index 8d7dc7b8d..78d6c6955 100644 --- a/blockchain/validation.go +++ b/blockchain/validation.go @@ -8,6 +8,8 @@ package blockchain import ( "crypto/sha256" "errors" + "github.com/elastos/Elastos.ELA/vm" + interfaces2 "github.com/elastos/Elastos.ELA/vm/interfaces" "sort" @@ -19,6 +21,48 @@ import ( "github.com/elastos/Elastos.ELA/crypto" ) +var GetDataContainer = func(programHash *common.Uint168, tx interfaces.Transaction) interfaces2.IDataContainer { + return tx +} + +func RunProgramsVM(tx interfaces.Transaction, hashes []common.Uint168, programs []*Program) error { + if tx == nil { + return errors.New("invalid data content nil transaction") + } + if len(hashes) != len(programs) { + return errors.New("number of data hashes is different with number of programs") + } + + for i := 0; i < len(programs); i++ { + codeHash := common.ToCodeHash(programs[i].Code) + + if !hashes[i].ToCodeHash().IsEqual(*codeHash) { + return errors.New("data hash is different from corresponding program code") + } + //execute program on VM + se := vm.NewExecutionEngine(GetDataContainer(&hashes[i], tx), + new(vm.CryptoECDsa), vm.MAXSTEPS, nil, nil) + se.LoadScript(programs[i].Code, false) + se.LoadScript(programs[i].Parameter, true) + se.Execute() + + if se.GetState() != vm.HALT { + return errors.New("[VM] Finish State not equal to HALT") + } + + if se.GetEvaluationStack().Count() != 1 { + return errors.New("[VM] Execute Engine Stack Count Error") + } + + success := se.GetExecuteResult() + if !success { + return errors.New("[VM] Check Sig FALSE") + } + } + + return nil +} + func RunPrograms(data []byte, programHashes []common.Uint168, programs []*Program) error { if len(programHashes) != len(programs) { return errors.New("the number of data hashes is different with number of programs") diff --git a/core/transaction/transaction.go b/core/transaction/transaction.go index fcbc6efca..7bcc93baf 100644 --- a/core/transaction/transaction.go +++ b/core/transaction/transaction.go @@ -563,3 +563,10 @@ func (tx *BaseTransaction) IsSmallTransfer(min common.Fixed64) bool { return totalCrossAmt <= min } + +// VM IDataContainer interface +func (tx *BaseTransaction) GetData() []byte { + buf := new(bytes.Buffer) + tx.SerializeUnsigned(buf) + return buf.Bytes() +} diff --git a/core/transaction/transactionchecker.go b/core/transaction/transactionchecker.go index 56090856a..31b03f95d 100644 --- a/core/transaction/transactionchecker.go +++ b/core/transaction/transactionchecker.go @@ -600,6 +600,13 @@ func checkTransactionSignature(tx interfaces.Transaction, references map[*common common.SortProgramHashByCodeHash(programHashes) blockchain.SortPrograms(tx.Programs()) return blockchain.RunPrograms(buf.Bytes(), programHashes, tx.Programs()) + + // todo complete me + // + //switch tx.TxType() { + //case common2.TxType + //} + //return blockchain.RunProgramsVM(tx, programHashes, tx.Programs()) } func checkTransactionDepositOutputs(bc *blockchain.BlockChain, txn interfaces.Transaction) error { diff --git a/core/types/interfaces/basetransaction.go b/core/types/interfaces/basetransaction.go index 2b54aec4b..682076aa7 100644 --- a/core/types/interfaces/basetransaction.go +++ b/core/types/interfaces/basetransaction.go @@ -11,9 +11,11 @@ import ( "github.com/elastos/Elastos.ELA/common" pg "github.com/elastos/Elastos.ELA/core/contract/program" common2 "github.com/elastos/Elastos.ELA/core/types/common" + "github.com/elastos/Elastos.ELA/vm/interfaces" ) type Transaction interface { + interfaces.IDataContainer TransactionChecker TransactionProcessor diff --git a/vm/common.go b/vm/common.go new file mode 100755 index 000000000..56b97b398 --- /dev/null +++ b/vm/common.go @@ -0,0 +1,372 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import ( + "encoding/binary" + "github.com/elastos/Elastos.ELA/vm/errors" + "github.com/elastos/Elastos.ELA/vm/types" + "math/big" + "reflect" +) + +type BigIntSorter []big.Int + +func (c BigIntSorter) Len() int { + return len(c) +} +func (c BigIntSorter) Swap(i, j int) { + if i >= 0 && i < len(c) && j >= 0 && j < len(c) { // Unit Test modify + c[i], c[j] = c[j], c[i] + } +} +func (c BigIntSorter) Less(i, j int) bool { + if i >= 0 && i < len(c) && j >= 0 && j < len(c) { // Unit Test modify + return c[i].Cmp(&c[j]) < 0 + } + + return false +} + +func ToBigInt(data interface{}) *big.Int { + var bi big.Int + switch t := data.(type) { + case int64: + bi.SetInt64(int64(t)) + case int32: + bi.SetInt64(int64(t)) + case int16: + bi.SetInt64(int64(t)) + case int8: + bi.SetInt64(int64(t)) + case int: + bi.SetInt64(int64(t)) + case uint64: + bi.SetUint64(uint64(t)) + case uint32: + bi.SetUint64(uint64(t)) + case uint16: + bi.SetUint64(uint64(t)) + case uint8: + bi.SetUint64(uint64(t)) + case uint: + bi.SetUint64(uint64(t)) + case big.Int: + bi = t + case *big.Int: + bi = *t + } + return &bi +} + +//common func +func SumBigInt(ints []big.Int) big.Int { + sum := big.NewInt(0) + for _, v := range ints { + sum = sum.Add(sum, &v) + } + return *sum +} + +func MinBigInt(ints []big.Int) big.Int { + minimum := ints[0] + + for _, d := range ints { + if d.Cmp(&minimum) < 0 { + minimum = d + } + } + + return minimum +} + +func MaxBigInt(ints []big.Int) big.Int { + max := ints[0] + + for _, d := range ints { + if d.Cmp(&max) > 0 { + max = d + } + } + + return max +} + +func MinInt64(datas []int64) int64 { + + var minimum int64 + for i, d := range datas { // Unit Test modify + if i == 0 { + minimum = d + } + if d < minimum { + minimum = d + } + } + + return minimum +} + +func MaxInt64(datas []int64) int64 { + + var maximum int64 + //i := 0 + for i, d := range datas { // Unit Test modify + if i == 0 { + maximum = d + //i++ + } + if d > maximum { + maximum = d + } + } + + return maximum +} + +func Concat(array1 []byte, array2 []byte) []byte { + len := len(array2) + for i := 0; i < len; i++ { + array1 = append(array1, array2[i]) // Unit Test modify + } + + return array1 +} + +func BigIntOp(bi *big.Int, op OpCode) *big.Int { + var nb *big.Int + switch op { + case INC: + nb = bi.Add(bi, big.NewInt(int64(1))) + case DEC: + nb = bi.Sub(bi, big.NewInt(int64(1))) + case SAL: + nb = bi.Lsh(bi, 1) + case SAR: + nb = bi.Rsh(bi, 1) + case NEGATE: + nb = bi.Neg(bi) + case ABS: + nb = bi.Abs(bi) + default: + nb = bi + } + return nb +} + +func AsBool(e interface{}) bool { + if v, ok := e.([]byte); ok { + for _, b := range v { + if b != 0 { + return true + } + } + } + return false +} + +func AsInt64(b []byte) (int64, error) { + if len(b) == 0 { + return 0, nil + } + if len(b) > 8 { + return 0, errors.ErrBadValue + } + + var bs [8]byte + copy(bs[:], b) + + res := binary.LittleEndian.Uint64(bs[:]) + + return int64(res), nil +} + +func ByteArrZip(s1 []byte, s2 []byte, op OpCode) []byte { + var ns []byte + switch op { + case CAT: + ns = append(s1, s2...) + } + return ns +} + +func BigIntZip(ints1 *big.Int, ints2 *big.Int, op OpCode) *big.Int { + var nb *big.Int + switch op { + case AND: + nb = ints1.And(ints1, ints2) + case OR: + nb = ints1.Or(ints1, ints2) + case XOR: + nb = ints1.Xor(ints1, ints2) + case ADD: + nb = ints1.Add(ints1, ints2) + case SUB: + nb = ints1.Sub(ints1, ints2) + case MUL: + nb = ints1.Mul(ints1, ints2) + case DIV: + nb = ints1.Div(ints1, ints2) + case MOD: + nb = ints1.Mod(ints1, ints2) + case SHL: + nb = ints1.Lsh(ints1, uint(ints2.Int64())) + case SHR: + nb = ints1.Rsh(ints1, uint(ints2.Int64())) + case MIN: + c := ints1.Cmp(ints2) + if c <= 0 { + nb = ints1 + } else { + nb = ints2 + } + case MAX: + c := ints1.Cmp(ints2) + if c <= 0 { + nb = ints2 + } else { + nb = ints1 + } + } + return nb +} + +func BigIntComp(bigint *big.Int, op OpCode) bool { + var nb bool + switch op { + case NZ: + nb = bigint.Cmp(big.NewInt(int64(0))) != 0 + } + return nb +} + +func BigIntMultiComp(ints1 *big.Int, ints2 *big.Int, op OpCode) bool { + var nb bool + switch op { + case NUMEQUAL: + nb = ints1.Cmp(ints2) == 0 + case NUMNOTEQUAL: + nb = ints1.Cmp(ints2) != 0 + case LT: + nb = ints1.Cmp(ints2) < 0 + case GT: + nb = ints1.Cmp(ints2) > 0 + case LTE: + nb = ints1.Cmp(ints2) <= 0 + case GTE: + nb = ints1.Cmp(ints2) >= 0 + } + return nb +} + +func BoolZip(bi1 bool, bi2 bool, op OpCode) bool { + var nb bool + switch op { + case BOOLAND: + nb = bi1 && bi2 + case BOOLOR: + nb = bi1 || bi2 + } + return nb +} + +func BoolArrayOp(bools []bool, op OpCode) []bool { + bls := []bool{} + for _, b := range bools { + var nb bool + + switch op { + case NOT: + nb = !b + default: + nb = b + } + bls = append(bls, nb) + } + + return bls +} + +func IsEqualBytes(b1 []byte, b2 []byte) bool { + len1 := len(b1) + len2 := len(b2) + if len1 != len2 { + return false + } + + for i := 0; i < len1; i++ { + if b1[i] != b2[i] { + return false + } + } + + return true +} + +func IsEqual(v1 interface{}, v2 interface{}) bool { + + if reflect.TypeOf(v1) != reflect.TypeOf(v2) { + return false + } + switch t1 := v1.(type) { + case []byte: + switch t2 := v2.(type) { + case []byte: + return IsEqualBytes(t1, t2) + } + case int8, int16, int32, int64: + if v1 == v2 { + return true + } + return false + default: + return false + } + + return false +} + +func WithInOp(int1 *big.Int, int2 *big.Int, int3 *big.Int) bool { + b1 := BigIntMultiComp(int1, int2, GTE) + b2 := BigIntMultiComp(int1, int3, LT) + return BoolZip(b1, b2, BOOLAND) +} + +func NewStackItems() []types.StackItem { + return make([]types.StackItem, 0) +} + +func NewStackItem(data interface{}) (types.StackItem, error) { + var stackItem types.StackItem + var err error + switch data.(type) { + case int8, int16, int32, int64, int, uint8, uint16, uint32, uint64, *big.Int, big.Int: + stackItem = types.NewInteger(ToBigInt(data)) + case bool: + stackItem = types.NewBoolean(data.(bool)) + case []byte: + stackItem = types.NewByteArray(data.([]byte)) + case []types.StackItem: + stackItem = types.NewArray(data.([]types.StackItem)) + default: + err = errors.ErrBadType + } + return stackItem, err +} + +func AssertExecutionContext(context interface{}) *ExecutionContext { + if c, ok := context.(*ExecutionContext); ok { + return c + } + return nil +} + +func AssertStackItem(stackItem interface{}) types.StackItem { + if s, ok := stackItem.(types.StackItem); ok { + return s + } + return nil +} diff --git a/vm/common_test.go b/vm/common_test.go new file mode 100644 index 000000000..f23557c7f --- /dev/null +++ b/vm/common_test.go @@ -0,0 +1,16 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import ( + "math/big" + "testing" +) + +func TestCommon(t *testing.T) { + i := ToBigInt(big.NewInt(1)) + t.Log("i", i) +} diff --git a/vm/crypto_ecdsa.go b/vm/crypto_ecdsa.go new file mode 100644 index 000000000..a6948801e --- /dev/null +++ b/vm/crypto_ecdsa.go @@ -0,0 +1,37 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import ( + "errors" + + "github.com/elastos/Elastos.ELA/crypto" +) + +type CryptoECDsa struct { +} + +func (c *CryptoECDsa) Hash168(data []byte) []byte { + return []byte{} +} + +func (c *CryptoECDsa) Hash256(data []byte) []byte { + return []byte{} +} + +func (c *CryptoECDsa) VerifySignature(data []byte, signature []byte, pubkey []byte) error { + + pk, err := crypto.DecodePoint(pubkey) + if err != nil { + return errors.New("[CryptoECDsa], crypto.DecodePoint failed.") + } + + err = crypto.Verify(*pk, data, signature) + if err != nil { + return errors.New("[CryptoECDsa], VerifySignature failed.") + } + return nil +} diff --git a/vm/doc.go b/vm/doc.go new file mode 100644 index 000000000..bdbf29701 --- /dev/null +++ b/vm/doc.go @@ -0,0 +1,17 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +/* +The go-vm library is free software: you can redistribute it and/or modify +it under the terms of the APACHA License + +package vm implemented a blockchain virtual machine, which provide following main functionaries: + +- opcode VM support the logic of opcode script +- apiservice for external interaction API with triggered by opcode +- crypto for external crypto implementations with triggered by opcode +- +*/ +package vm diff --git a/vm/errors/errors.go b/vm/errors/errors.go new file mode 100755 index 000000000..5554fad57 --- /dev/null +++ b/vm/errors/errors.go @@ -0,0 +1,15 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package errors + +import "errors" + +var ( + ErrBadValue = errors.New("bad value") + ErrBadType = errors.New("bad type") + ErrOverLen = errors.New("the count over the size") + ErrFault = errors.New("The exeution meet fault") +) diff --git a/vm/execution_context.go b/vm/execution_context.go new file mode 100755 index 000000000..5277f2d7a --- /dev/null +++ b/vm/execution_context.go @@ -0,0 +1,34 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import "github.com/elastos/Elastos.ELA/vm/utils" + +type ExecutionContext struct { + Script []byte + OpReader *utils.VmReader + PushOnly bool + BreakPoints []uint + InstructionPointer int +} + +func NewExecutionContext(script []byte, pushOnly bool, breakPoints []uint) *ExecutionContext { + var executionContext ExecutionContext + executionContext.Script = script + executionContext.OpReader = utils.NewVmReader(script) + executionContext.PushOnly = pushOnly + executionContext.BreakPoints = breakPoints + executionContext.InstructionPointer = executionContext.OpReader.Position() + return &executionContext +} + +func (ec *ExecutionContext) NextInstruction() OpCode { + return OpCode(ec.Script[ec.OpReader.Position()]) +} + +func (ec *ExecutionContext) Clone() *ExecutionContext { + return NewExecutionContext(ec.Script, ec.PushOnly, ec.BreakPoints) +} diff --git a/vm/execution_engine.go b/vm/execution_engine.go new file mode 100755 index 000000000..3a6569927 --- /dev/null +++ b/vm/execution_engine.go @@ -0,0 +1,211 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import ( + "io" + _ "math/big" + _ "sort" + + "github.com/elastos/Elastos.ELA/vm/interfaces" + "github.com/elastos/Elastos.ELA/vm/utils" +) + +const MAXSTEPS int = 1200 + +func NewExecutionEngine(container interfaces.IDataContainer, crypto interfaces.ICrypto, maxSteps int, table interfaces.IScriptTable, service *GeneralService) *ExecutionEngine { + var engine ExecutionEngine + + engine.crypto = crypto + engine.table = table + + engine.dataContainer = container + engine.invocationStack = utils.NewRandAccessStack() + engine.opCount = 0 + + engine.evaluationStack = utils.NewRandAccessStack() + engine.altStack = utils.NewRandAccessStack() + engine.state = BREAK + + engine.context = nil + engine.opCode = 0 + + engine.maxSteps = maxSteps + + if service != nil { + engine.service = service + } + + engine.service = NewGeneralService() + + return &engine +} + +type ExecutionEngine struct { + crypto interfaces.ICrypto + table interfaces.IScriptTable + service *GeneralService + + dataContainer interfaces.IDataContainer + invocationStack *utils.RandomAccessStack + opCount int + + maxSteps int + + evaluationStack *utils.RandomAccessStack + altStack *utils.RandomAccessStack + state VMState + + context *ExecutionContext + + //current opcode + opCode OpCode +} + +func (e *ExecutionEngine) GetState() VMState { + return e.state +} + +func (e *ExecutionEngine) GetEvaluationStack() *utils.RandomAccessStack { + return e.evaluationStack +} + +func (e *ExecutionEngine) GetExecuteResult() bool { + return AssertStackItem(e.evaluationStack.Pop()).GetBoolean() +} + +func (e *ExecutionEngine) ExecutingScript() []byte { + context := AssertExecutionContext(e.invocationStack.Peek(0)) + if context != nil { + return context.Script + } + return nil +} + +func (e *ExecutionEngine) CallingScript() []byte { + if e.invocationStack.Count() > 1 { + context := AssertExecutionContext(e.invocationStack.Peek(1)) + if context != nil { + return context.Script + } + return nil + } + return nil +} + +func (e *ExecutionEngine) EntryScript() []byte { + context := AssertExecutionContext(e.invocationStack.Peek(e.invocationStack.Count() - 1)) + if context != nil { + return context.Script + } + return nil +} + +func (e *ExecutionEngine) LoadScript(script []byte, pushOnly bool) { + e.invocationStack.Push(NewExecutionContext(script, pushOnly, nil)) +} + +func (e *ExecutionEngine) Execute() { + e.state = e.state & (^BREAK) + for { + if e.state == FAULT || e.state == HALT || e.state == BREAK { + break + } + e.StepInto() + } +} + +func (e *ExecutionEngine) StepInto() { + if e.invocationStack.Count() == 0 { + e.state = VMState(e.state | HALT) + } + if e.state&HALT == HALT || e.state&FAULT == FAULT { + return + } + context := AssertExecutionContext(e.invocationStack.Pop()) + if context.InstructionPointer >= len(context.Script) { + e.opCode = RET + } + for { + opCode, err := context.OpReader.ReadByte() + if err == io.EOF && opCode == 0 { + return + } + e.opCount++ + state, err := e.ExecuteOp(OpCode(opCode), context) + switch state { + case VMState(HALT): + e.state = VMState(e.state | HALT) + return + case VMState(FAULT): + e.state = VMState(e.state | FAULT) + return + } + } +} + +func (e *ExecutionEngine) ExecuteOp(opCode OpCode, context *ExecutionContext) (VMState, error) { + if opCode > PUSH16 && opCode != RET && context.PushOnly { + return FAULT, nil + } + if opCode > PUSH16 && e.opCount > e.maxSteps { + return FAULT, nil + } + if opCode >= PUSHBYTES1 && opCode <= PUSHBYTES75 { + err := pushData(e, context.OpReader.ReadBytes(int(opCode))) + if err != nil { + return FAULT, err + } + return NONE, nil + } + e.opCode = opCode + e.context = context + opExec := OpExecList[opCode] + if opExec.Exec == nil { + return FAULT, nil + } + state, err := opExec.Exec(e) + if err != nil { + return state, err + } + return NONE, nil +} + +func (e *ExecutionEngine) StepOut() { + e.state = e.state & (^BREAK) + c := e.invocationStack.Count() + for { + if e.state == FAULT || e.state == HALT || e.state == BREAK || e.invocationStack.Count() >= c { + break + } + e.StepInto() + } +} + +func (e *ExecutionEngine) StepOver() { + if e.state == FAULT || e.state == HALT { + return + } + e.state = e.state & (^BREAK) + c := e.invocationStack.Count() + for { + if e.state == FAULT || e.state == HALT || e.state == BREAK || e.invocationStack.Count() > c { + break + } + e.StepInto() + } +} + +func (e *ExecutionEngine) AddBreakPoint(position uint) { + //b := e.context.BreakPoints + //b = append(b, position) +} + +func (e *ExecutionEngine) RemoveBreakPoint(position uint) bool { + //if e.invocationStack.Count() == 0 { return false } + //b := e.context.BreakPoints + return true +} diff --git a/vm/func_arithmetic.go b/vm/func_arithmetic.go new file mode 100755 index 000000000..152c91169 --- /dev/null +++ b/vm/func_arithmetic.go @@ -0,0 +1,95 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +func opBigInt(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + x := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + err := pushData(e, BigIntOp(x, e.opCode)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opNot(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + x := AssertStackItem(e.evaluationStack.Pop()).GetBoolean() + err := pushData(e, !x) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opNz(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + x := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + err := pushData(e, BigIntComp(x, e.opCode)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opBigIntZip(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + x1 := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + err := pushData(e, BigIntZip(x1, x2, e.opCode)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opBoolZip(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := AssertStackItem(e.evaluationStack.Pop()).GetBoolean() + x1 := AssertStackItem(e.evaluationStack.Pop()).GetBoolean() + err := pushData(e, BoolZip(x1, x2, e.opCode)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opBigIntComp(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + x1 := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + err := pushData(e, BigIntMultiComp(x1, x2, e.opCode)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opWithIn(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 3 { + return FAULT, nil + } + b := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + a := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + x := AssertStackItem(e.evaluationStack.Pop()).GetBigInteger() + err := pushData(e, WithInOp(x, a, b)) + if err != nil { + return FAULT, err + } + return NONE, nil +} diff --git a/vm/func_array.go b/vm/func_array.go new file mode 100755 index 000000000..3a9ee3ffa --- /dev/null +++ b/vm/func_array.go @@ -0,0 +1,76 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +func opArraySize(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + arr := AssertStackItem(e.evaluationStack.Pop()).GetArray() + err := pushData(e, len(arr)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opPack(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + size := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if size < 0 || size > e.evaluationStack.Count() { + return FAULT, nil + } + items := NewStackItems() + for { + if size == 0 { + break + } + items = append(items, AssertStackItem(e.evaluationStack.Pop())) + size-- + } + err := pushData(e, items) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opUnpack(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + arr := AssertStackItem(e.evaluationStack.Pop()).GetArray() + l := len(arr) + for i := l - 1; i >= 0; i-- { + e.evaluationStack.Push(arr[i]) + } + err := pushData(e, l) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opPickItem(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + index := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if index < 0 { + return FAULT, nil + } + items := AssertStackItem(e.evaluationStack.Pop()).GetArray() + if index >= len(items) { + return FAULT, nil + } + err := pushData(e, items[index]) + if err != nil { + return FAULT, err + } + return NONE, nil +} diff --git a/vm/func_bitwise.go b/vm/func_bitwise.go new file mode 100755 index 000000000..f4c2c2760 --- /dev/null +++ b/vm/func_bitwise.go @@ -0,0 +1,34 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +func opInvert(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + x := e.evaluationStack.Pop() + i := AssertStackItem(x).GetBigInteger() + err := pushData(e, i.Not(i)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opEqual(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := e.evaluationStack.Pop() + x1 := e.evaluationStack.Pop() + b1 := AssertStackItem(x1) + b2 := AssertStackItem(x2) + err := pushData(e, b1.Equals(b2)) + if err != nil { + return FAULT, err + } + return NONE, nil +} diff --git a/vm/func_crypto.go b/vm/func_crypto.go new file mode 100755 index 000000000..b6c154448 --- /dev/null +++ b/vm/func_crypto.go @@ -0,0 +1,129 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import ( + "crypto/sha1" + "crypto/sha256" + "errors" + "hash" +) + +func opHash(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + x := AssertStackItem(e.evaluationStack.Pop()).GetByteArray() + err := pushData(e, Hash(x, e)) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opCheckSig(e *ExecutionEngine) (VMState, error) { + if e.dataContainer == nil { + return FAULT, nil + } + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + pubkey := AssertStackItem(e.evaluationStack.Pop()).GetByteArray() + signature := AssertStackItem(e.evaluationStack.Pop()).GetByteArray() + err := e.crypto.VerifySignature(e.dataContainer.GetData(), signature, pubkey) + err = pushData(e, err == nil) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opCheckMultiSig(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 4 { + return FAULT, errors.New("element count is not enough") + } + n := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if n < 1 { + return FAULT, errors.New("invalid n in multisig") + } + if e.evaluationStack.Count() < n+2 { + return FAULT, errors.New("invalid element count") + } + e.opCount += n + if e.opCount > e.maxSteps { + return FAULT, errors.New("too many OP code") + } + + pubkeys := make([][]byte, n) + for i := 0; i < n; i++ { + pubkeys[i] = AssertStackItem(e.evaluationStack.Pop()).GetByteArray() + } + + m := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if m < 1 || m > n { + return FAULT, errors.New("invalid m in multisig") + } + if e.evaluationStack.Count() < m { + return FAULT, errors.New("signatures in stack is not enough") + } + if e.evaluationStack.Count() > n { + return FAULT, errors.New("too many signatures in stack") + } + + signatures := make([][]byte, 0, n) + for e.evaluationStack.Count() > 0 { + signatures = append(signatures, AssertStackItem(e.evaluationStack.Pop()).GetByteArray()) + } + + data := e.dataContainer.GetData() + fSuccess := true + verified := 0 + for _, sig := range signatures { + index := -1 + for i, pubkey := range pubkeys { + err := e.crypto.VerifySignature(data, sig, pubkey) + if err == nil { + index = i + verified++ + break + } + } + if index != -1 { + pubkeys = append(pubkeys[:index], pubkeys[index+1:]...) + } else { + fSuccess = false + break + } + } + if verified < m { + fSuccess = false + } + err := pushData(e, fSuccess) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func Hash(b []byte, e *ExecutionEngine) []byte { + var sh hash.Hash + var bt []byte + switch e.opCode { + case SHA1: + sh = sha1.New() + sh.Write(b) + bt = sh.Sum(nil) + case SHA256: + sh = sha256.New() + sh.Write(b) + bt = sh.Sum(nil) + case HASH160: + bt = e.crypto.Hash168(b) + case HASH256: + bt = e.crypto.Hash256(b) + } + return bt +} diff --git a/vm/func_flowcontrol.go b/vm/func_flowcontrol.go new file mode 100755 index 000000000..cf73245f3 --- /dev/null +++ b/vm/func_flowcontrol.go @@ -0,0 +1,86 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +import ( + "io" + "time" + + "github.com/elastos/Elastos.ELA/vm/errors" +) + +func opNop(e *ExecutionEngine) (VMState, error) { + time.Sleep(1 * time.Millisecond) + return NONE, nil +} + +func opJmp(e *ExecutionEngine) (VMState, error) { + offset := int(e.context.OpReader.ReadInt16()) + offset = e.context.InstructionPointer + offset - 3 + + if offset < 0 || offset > len(e.context.Script) { + return FAULT, errors.ErrFault + } + fValue := true + if e.opCode > JMP { + s := AssertStackItem(e.evaluationStack.Pop()) + fValue = s.GetBoolean() + if e.opCode == JMPIFNOT { + fValue = !fValue + } + } + if fValue { + e.context.InstructionPointer = offset + } + + return NONE, nil +} + +func opCall(e *ExecutionEngine) (VMState, error) { + e.invocationStack.Push(e.context.Clone()) + e.context.InstructionPointer += 2 + opJmp(e) + return NONE, nil +} + +func opRet(e *ExecutionEngine) (VMState, error) { + if e.invocationStack.Count() < 2 { + return FAULT, nil + } + x := AssertStackItem(e.invocationStack.Pop()) + position := x.GetBigInteger().Int64() + if position < 0 || position > int64(e.context.OpReader.Length()) { + return FAULT, nil + } + e.invocationStack.Push(x) + e.context.OpReader.Seek(position, io.SeekStart) + return NONE, nil +} + +func opAppCall(e *ExecutionEngine) (VMState, error) { + if e.table == nil { + return FAULT, nil + } + script_hash := e.context.OpReader.ReadBytes(20) + script := e.table.GetScript(script_hash) + if script == nil { + return FAULT, nil + } + e.LoadScript(script, false) + return NONE, nil +} + +func opSysCall(e *ExecutionEngine) (VMState, error) { + if e.service == nil { + return FAULT, nil + } + success := e.service.Invoke(e.context.OpReader.ReadVarString(), e) + if success { + return NONE, nil + } else { + return FAULT, nil + } +} diff --git a/vm/func_pushdata.go b/vm/func_pushdata.go new file mode 100755 index 000000000..f6316dac3 --- /dev/null +++ b/vm/func_pushdata.go @@ -0,0 +1,41 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +func opPushData(e *ExecutionEngine) (VMState, error) { + data, err := getPushData(e) + if err != nil { + return FAULT, err + } + err = pushData(e, data) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func getPushData(e *ExecutionEngine) (interface{}, error) { + var data interface{} + + if e.opCode >= PUSHBYTES1 && e.opCode <= PUSHBYTES75 { + data = e.context.OpReader.ReadBytes(int(e.opCode)) + } + switch e.opCode { + case PUSH0: + data = []byte{0} + case PUSHDATA1: + d, _ := e.context.OpReader.ReadByte() + data = e.context.OpReader.ReadBytes(int(d)) + case PUSHDATA2: + data = e.context.OpReader.ReadBytes(int(e.context.OpReader.ReadUint16())) + case PUSHDATA4: + data = e.context.OpReader.ReadBytes(int(e.context.OpReader.ReadInt32())) + case PUSHM1, PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16: + data = int8(e.opCode - PUSH1 + 1) + } + + return data, nil +} diff --git a/vm/func_splice.go b/vm/func_splice.go new file mode 100755 index 000000000..a91b78fff --- /dev/null +++ b/vm/func_splice.go @@ -0,0 +1,105 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +func opCat(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := e.evaluationStack.Pop() + x1 := e.evaluationStack.Pop() + b1 := AssertStackItem(x1).GetByteArray() + b2 := AssertStackItem(x2).GetByteArray() + if len(b1) != len(b2) { + return FAULT, nil + } + r := ByteArrZip(b1, b2, CAT) + pushData(e, r) + return NONE, nil +} + +func opSubStr(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 3 { + return FAULT, nil + } + count := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if count < 0 { + return FAULT, nil + } + index := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if index < 0 { + return FAULT, nil + } + x := e.evaluationStack.Pop() + s := AssertStackItem(x).GetByteArray() + l1 := index + count + l2 := len(s) + if l1 > l2 { + return FAULT, nil + } + b := s[index : l2-l1+1] + err := pushData(e, b) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opLeft(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + count := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if count < 0 { + return FAULT, nil + } + x := e.evaluationStack.Pop() + s := AssertStackItem(x).GetByteArray() + if count > len(s) { + return FAULT, nil + } + b := s[:count] + err := pushData(e, b) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opRight(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + count := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if count < 0 { + return FAULT, nil + } + x := e.evaluationStack.Pop() + s := AssertStackItem(x).GetByteArray() + l := len(s) + if count > l { + return FAULT, nil + } + b := s[l-count:] + err := pushData(e, b) + if err != nil { + return FAULT, err + } + return NONE, nil +} + +func opSize(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + x := e.evaluationStack.Peek(0) + s := AssertStackItem(x).GetByteArray() + err := pushData(e, len(s)) + if err != nil { + return FAULT, err + } + return NONE, nil +} diff --git a/vm/func_stack.go b/vm/func_stack.go new file mode 100755 index 000000000..242dc1006 --- /dev/null +++ b/vm/func_stack.go @@ -0,0 +1,178 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +func opToAltStack(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + e.altStack.Push(e.evaluationStack.Pop()) + return NONE, nil +} + +func opFromAltStack(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + e.evaluationStack.Push(e.altStack.Pop()) + return NONE, nil +} + +func opXDrop(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + n := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if n < 0 { + return FAULT, nil + } + e.evaluationStack.Remove(n) + return NONE, nil +} + +func opXSwap(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + n := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if n < 0 || n > e.evaluationStack.Count()-1 { + return FAULT, nil + } + e.evaluationStack.Swap(0, n) + return NONE, nil +} + +func opXTuck(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + n := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if n < 0 || n > e.evaluationStack.Count()-1 { + return FAULT, nil + } + e.evaluationStack.Insert(n, e.evaluationStack.Peek(0)) + return NONE, nil +} + +func opDepth(e *ExecutionEngine) (VMState, error) { + pushData(e, e.evaluationStack.Count()) + return NONE, nil +} + +func opDrop(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + e.evaluationStack.Pop() + return NONE, nil +} + +func opDup(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 1 { + return FAULT, nil + } + e.evaluationStack.Push(e.evaluationStack.Peek(0)) + return NONE, nil +} + +func opNip(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := e.evaluationStack.Pop() + e.evaluationStack.Pop() + e.evaluationStack.Push(x2) + return NONE, nil +} + +func opOver(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := e.evaluationStack.Pop() + x1 := e.evaluationStack.Peek(0) + e.evaluationStack.Push(x2) + e.evaluationStack.Push(x1) + return NONE, nil +} + +func opPick(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + n := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if n < 0 { + return FAULT, nil + } + if e.evaluationStack.Count() < n+1 { + return FAULT, nil + } + e.evaluationStack.Push(e.evaluationStack.Peek(n)) + return NONE, nil +} + +func opRoll(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + n := int(AssertStackItem(e.evaluationStack.Pop()).GetBigInteger().Int64()) + if n < 0 { + return FAULT, nil + } + if n == 0 { + return NONE, nil + } + if e.evaluationStack.Count() < n+1 { + return FAULT, nil + } + e.evaluationStack.Push(e.evaluationStack.Remove(n)) + return NONE, nil +} + +func opRot(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 3 { + return FAULT, nil + } + x3 := e.evaluationStack.Pop() + x2 := e.evaluationStack.Pop() + x1 := e.evaluationStack.Pop() + e.evaluationStack.Push(x2) + e.evaluationStack.Push(x3) + e.evaluationStack.Push(x1) + return NONE, nil +} + +func opSwap(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := e.evaluationStack.Pop() + x1 := e.evaluationStack.Pop() + e.evaluationStack.Push(x2) + e.evaluationStack.Push(x1) + return NONE, nil +} + +func opTuck(e *ExecutionEngine) (VMState, error) { + if e.evaluationStack.Count() < 2 { + return FAULT, nil + } + x2 := e.evaluationStack.Pop() + x1 := e.evaluationStack.Pop() + e.evaluationStack.Push(x2) + e.evaluationStack.Push(x1) + e.evaluationStack.Push(x2) + return NONE, nil +} + +func pushData(e *ExecutionEngine, data interface{}) error { + d, err := NewStackItem(data) + if err == nil { + e.evaluationStack.Push(d) + return nil + } + return err +} diff --git a/vm/general_service.go b/vm/general_service.go new file mode 100644 index 000000000..9c392122b --- /dev/null +++ b/vm/general_service.go @@ -0,0 +1,55 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +type GeneralService struct { + dictionary map[string]func(*ExecutionEngine) bool +} + +func NewGeneralService() *GeneralService { + var is GeneralService + is.dictionary = make(map[string]func(*ExecutionEngine) bool, 0) + is.Register("System.ScriptEngine.GetScriptContainer", is.GetScriptContainer) + is.Register("System.ScriptEngine.GetExecutingScriptHash", is.GetExecutingScriptHash) + is.Register("System.ScriptEngine.GetCallingScriptHash", is.GetCallingScriptHash) + is.Register("System.ScriptEngine.GetEntryScriptHash", is.GetEntryScriptHash) + return &is +} + +func (is *GeneralService) Register(method string, handler func(*ExecutionEngine) bool) bool { + if _, ok := is.dictionary[method]; ok { + return false + } + is.dictionary[method] = handler + return true +} + +func (is *GeneralService) Invoke(method string, engine *ExecutionEngine) bool { + if v, ok := is.dictionary[method]; ok { + return v(engine) + } + return false +} + +func (is *GeneralService) GetScriptContainer(engine *ExecutionEngine) bool { + engine.evaluationStack.Push(engine.dataContainer) + return true +} + +func (is *GeneralService) GetExecutingScriptHash(engine *ExecutionEngine) bool { + engine.evaluationStack.Push(engine.crypto.Hash168(engine.ExecutingScript())) + return true +} + +func (is *GeneralService) GetCallingScriptHash(engine *ExecutionEngine) bool { + engine.evaluationStack.Push(engine.crypto.Hash168(engine.CallingScript())) + return true +} + +func (is *GeneralService) GetEntryScriptHash(engine *ExecutionEngine) bool { + engine.evaluationStack.Push(engine.crypto.Hash168(engine.EntryScript())) + return true +} diff --git a/vm/interfaces/crypto.go b/vm/interfaces/crypto.go new file mode 100755 index 000000000..b0b3c88cf --- /dev/null +++ b/vm/interfaces/crypto.go @@ -0,0 +1,14 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package interfaces + +type ICrypto interface { + Hash168(data []byte) []byte + + Hash256(data []byte) []byte + + VerifySignature(data []byte, signature []byte, pubkey []byte) error +} diff --git a/vm/interfaces/datacontainer.go b/vm/interfaces/datacontainer.go new file mode 100644 index 000000000..21d0c6eb7 --- /dev/null +++ b/vm/interfaces/datacontainer.go @@ -0,0 +1,10 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package interfaces + +type IDataContainer interface { + GetData() []byte +} diff --git a/vm/interfaces/general.go b/vm/interfaces/general.go new file mode 100644 index 000000000..4fa1973e7 --- /dev/null +++ b/vm/interfaces/general.go @@ -0,0 +1,10 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package interfaces + +type IGeneralInterface interface { + Bytes() []byte +} diff --git a/vm/interfaces/scripttable.go b/vm/interfaces/scripttable.go new file mode 100755 index 000000000..efda9dca6 --- /dev/null +++ b/vm/interfaces/scripttable.go @@ -0,0 +1,10 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package interfaces + +type IScriptTable interface { + GetScript(hash []byte) []byte +} diff --git a/vm/interfaces/signable.go b/vm/interfaces/signable.go new file mode 100755 index 000000000..d06b80127 --- /dev/null +++ b/vm/interfaces/signable.go @@ -0,0 +1,10 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package interfaces + +type ISignable interface { + GetSignableData() []byte +} diff --git a/vm/opcode.go b/vm/opcode.go old mode 100644 new mode 100755 index 79c205828..28039ad23 --- a/vm/opcode.go +++ b/vm/opcode.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // @@ -115,6 +115,7 @@ const ( HASH160 = 0xA9 HASH256 = 0xAA CHECKSIG = 0xAC // The entire transaction's outputs inputs and script (from the most recently-executed CODESEPARATOR to the end) are hashed. The signature used by CHECKSIG must be a valid signature for this hash and public key. If it is 1 is returned 0 otherwise. + CHECKREGID = 0xAD CHECKMULTISIG = 0xAE // For each signature and public key pair CHECKSIG is executed. If more public keys than signatures are listed some key/sig pairs can fail. All signatures need to match a public key. If all signatures are valid 1 is returned 0 otherwise. Due to a bug one extra unused value is removed from the stack. CROSSCHAIN = 0xAF diff --git a/vm/opcode_exec.go b/vm/opcode_exec.go new file mode 100644 index 000000000..4bf29257e --- /dev/null +++ b/vm/opcode_exec.go @@ -0,0 +1,125 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +type OpExec struct { + Opcode OpCode + Name string + Exec func(*ExecutionEngine) (VMState, error) +} + +var ( + OpExecList = [256]OpExec{ + // control flow + PUSH0: {PUSH0, "0", opPushData}, + PUSHBYTES1: {PUSHBYTES1, "PUSHBYTES1", opPushData}, + PUSHBYTES75: {PUSHBYTES75, "PUSHBYTES75", opPushData}, + PUSHDATA1: {PUSHDATA1, "PUSHDATA1", opPushData}, + PUSHDATA2: {PUSHDATA2, "PUSHDATA2", opPushData}, + PUSHDATA4: {PUSHDATA4, "PUSHDATA4", opPushData}, + PUSHM1: {PUSHM1, "PUSHM1", opPushData}, + PUSH1: {PUSH1, "1", opPushData}, + PUSH2: {PUSH2, "2", opPushData}, + PUSH3: {PUSH3, "3", opPushData}, + PUSH4: {PUSH4, "4", opPushData}, + PUSH5: {PUSH5, "5", opPushData}, + PUSH6: {PUSH6, "6", opPushData}, + PUSH7: {PUSH7, "7", opPushData}, + PUSH8: {PUSH8, "8", opPushData}, + PUSH9: {PUSH9, "9", opPushData}, + PUSH10: {PUSH10, "10", opPushData}, + PUSH11: {PUSH11, "11", opPushData}, + PUSH12: {PUSH12, "12", opPushData}, + PUSH13: {PUSH13, "13", opPushData}, + PUSH14: {PUSH14, "14", opPushData}, + PUSH15: {PUSH15, "15", opPushData}, + PUSH16: {PUSH16, "16", opPushData}, + + //Control + NOP: {NOP, "NOP", opNop}, + JMP: {JMP, "JMP", opJmp}, + JMPIF: {JMPIF, "JMPIF", opJmp}, + JMPIFNOT: {JMPIFNOT, "JMPIFNOT", opJmp}, + CALL: {CALL, "CALL", opCall}, + RET: {RET, "RET", opRet}, + APPCALL: {APPCALL, "APPCALL", opAppCall}, + SYSCALL: {SYSCALL, "SYSCALL", opSysCall}, + + //Stack ops + TOALTSTACK: {TOALTSTACK, "TOALTSTACK", opToAltStack}, + FROMALTSTACK: {FROMALTSTACK, "FROMALTSTACK", opFromAltStack}, + XDROP: {XDROP, "XDROP", opXDrop}, + XSWAP: {XSWAP, "XSWAPP", opXSwap}, + XTUCK: {XTUCK, "XTUCK", opXTuck}, + DEPTH: {DEPTH, "DEPTH", opDepth}, + DROP: {DROP, "DROP", opDrop}, + DUP: {DUP, "DUP", opDup}, + NIP: {NIP, "NIP", opNip}, + OVER: {OVER, "OVER", opOver}, + PICK: {PICK, "PICK", opPick}, + ROLL: {ROLL, "ROLL", opRoll}, + ROT: {ROT, "ROT", opRot}, + SWAP: {SWAP, "SWAP", opSwap}, + TUCK: {TUCK, "TUCK", opTuck}, + + //Splice + CAT: {CAT, "CAT", opCat}, + SUBSTR: {SUBSTR, "SUBSTR", opSubStr}, + LEFT: {LEFT, "LEFT", opLeft}, + RIGHT: {RIGHT, "RIGHT", opRight}, + SIZE: {SIZE, "SIZE", opSize}, + + //Bitwiase logic + INVERT: {INVERT, "INVERT", opInvert}, + AND: {AND, "AND", opBigIntZip}, + OR: {OR, "OR", opBigIntZip}, + XOR: {XOR, "XOR", opBigIntZip}, + EQUAL: {EQUAL, "EQUAL", opEqual}, + + //Arithmetic + INC: {INC, "INC", opBigInt}, + DEC: {DEC, "DEC", opBigInt}, + SAL: {SAL, "SAL", opBigInt}, + SAR: {SAR, "SAR", opBigInt}, + NEGATE: {NEGATE, "NEGATE", opBigInt}, + ABS: {ABS, "ABS", opBigInt}, + NOT: {NOT, "NOT", opNot}, + NZ: {NZ, "NZ", opNz}, + ADD: {ADD, "ADD", opBigIntZip}, + SUB: {SUB, "SUB", opBigIntZip}, + MUL: {MUL, "MUL", opBigIntZip}, + DIV: {DIV, "DIV", opBigIntZip}, + MOD: {MOD, "MOD", opBigIntZip}, + SHL: {SHL, "SHL", opBigIntZip}, + SHR: {SHR, "SHR", opBigIntZip}, + BOOLAND: {BOOLAND, "BOOLAND", opBoolZip}, + BOOLOR: {BOOLOR, "BOOLOR", opBoolZip}, + NUMEQUAL: {NUMEQUAL, "NUMEQUAL", opBigIntComp}, + NUMNOTEQUAL: {NUMNOTEQUAL, "NUMNOTEQUAL", opBigIntComp}, + LT: {LT, "LT", opBigIntComp}, + GT: {GT, "GT", opBigIntComp}, + LTE: {LTE, "LTE", opBigIntComp}, + GTE: {GTE, "GTE", opBigIntComp}, + MIN: {MIN, "MIN", opBigIntZip}, + MAX: {MAX, "MAX", opBigIntZip}, + WITHIN: {WITHIN, "WITHIN", opWithIn}, + + //Crypto + SHA1: {SHA1, "SHA1", opHash}, + SHA256: {SHA256, "SHA256", opHash}, + HASH160: {HASH160, "HASH160", opHash}, + HASH256: {HASH256, "HASH256", opHash}, + CHECKSIG: {CHECKSIG, "CHECKSIG", opCheckSig}, + CHECKREGID: {CHECKREGID, "CHECKREGID", opCheckSig}, + CHECKMULTISIG: {CHECKMULTISIG, "CHECKMULTISIG", opCheckMultiSig}, + + //Array + ARRAYSIZE: {ARRAYSIZE, "ARRAYSIZE", opArraySize}, + PACK: {PACK, "PACK", opPack}, + UNPACK: {UNPACK, "UNPACK", opUnpack}, + PICKITEM: {PICKITEM, "PICKITEM", opPickItem}, + } +) diff --git a/vm/types/array.go b/vm/types/array.go new file mode 100644 index 000000000..b8d575973 --- /dev/null +++ b/vm/types/array.go @@ -0,0 +1,66 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "math/big" +) + +type Array struct { + items []StackItem +} + +func NewArray(value []StackItem) *Array { + var a Array + a.items = value + return &a +} + +func (a *Array) Equals(other StackItem) bool { + if _, ok := other.(*Array); !ok { + return false + } + a1 := a.items + a2 := other.GetArray() + l1 := len(a1) + l2 := len(a2) + if l1 != l2 { + return false + } + for i := 0; i < l1; i++ { + if !a1[i].Equals(a2[i]) { + return false + } + } + return true + +} + +func (a *Array) GetBigInteger() *big.Int { + if len(a.items) == 0 { + return big.NewInt(0) + } + return a.items[0].GetBigInteger() +} + +func (a *Array) GetBoolean() bool { + if len(a.items) == 0 { + return false + } + return a.items[0].GetBoolean() +} + +func (a *Array) GetByteArray() []byte { + return []byte{} +} + +func (a *Array) GetInterface() { + +} + +func (a *Array) GetArray() []StackItem { + return a.items +} diff --git a/vm/types/boolean.go b/vm/types/boolean.go new file mode 100644 index 000000000..95802fce6 --- /dev/null +++ b/vm/types/boolean.go @@ -0,0 +1,56 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "math/big" +) + +type Boolean struct { + value bool +} + +func NewBoolean(value bool) *Boolean { + var b Boolean + b.value = value + return &b +} + +func (b *Boolean) Equals(other StackItem) bool { + if _, ok := other.(*Boolean); !ok { + return false + } + if b.value != other.GetBoolean() { + return false + } + return true +} + +func (b *Boolean) GetBigInteger() *big.Int { + if b.value { + return big.NewInt(1) + } + return big.NewInt(0) +} + +func (b *Boolean) GetBoolean() bool { + return b.value +} + +func (b *Boolean) GetByteArray() []byte { + if b.value { + return []byte{1} + } + return []byte{0} +} + +func (b *Boolean) GetInterface() { + +} + +func (b *Boolean) GetArray() []StackItem { + return []StackItem{b} +} diff --git a/vm/types/bytearray.go b/vm/types/bytearray.go new file mode 100644 index 000000000..c058a0960 --- /dev/null +++ b/vm/types/bytearray.go @@ -0,0 +1,65 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "math/big" +) + +type ByteArray struct { + value []byte +} + +func NewByteArray(value []byte) *ByteArray { + var ba ByteArray + ba.value = value + return &ba +} + +func (ba *ByteArray) Equals(other StackItem) bool { + if _, ok := other.(*ByteArray); !ok { + return false + } + a1 := ba.value + a2 := other.GetByteArray() + l1 := len(a1) + l2 := len(a2) + if l1 != l2 { + return false + } + for i := 0; i < l1; i++ { + if a1[i] != a2[i] { + return false + } + } + return true +} + +func (ba *ByteArray) GetBigInteger() *big.Int { + var bi big.Int + return bi.SetBytes(ba.value) +} + +func (ba *ByteArray) GetBoolean() bool { + for _, b := range ba.value { + if b != 0 { + return true + } + } + return false +} + +func (ba *ByteArray) GetByteArray() []byte { + return ba.value +} + +func (ba *ByteArray) GetInterface() { + +} + +func (ba *ByteArray) GetArray() []StackItem { + return []StackItem{ba} +} diff --git a/vm/types/general.go b/vm/types/general.go new file mode 100644 index 000000000..00ae131b2 --- /dev/null +++ b/vm/types/general.go @@ -0,0 +1,47 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "github.com/elastos/Elastos.ELA/vm/interfaces" + "math/big" +) + +type GeneralInterface struct { + object interfaces.IGeneralInterface +} + +func NewGeneralInterface(value interfaces.IGeneralInterface) *GeneralInterface { + var ii GeneralInterface + ii.object = value + return &ii +} + +func (ii *GeneralInterface) Equals() bool { + return false +} + +func (ii *GeneralInterface) GetBigInteger() big.Int { + return big.Int{} +} + +func (ii *GeneralInterface) GetBoolean() bool { + if ii.object == nil { + return false + } + return true +} + +func (ii *GeneralInterface) GetByteArray() []byte { + return ii.object.Bytes() +} + +func (ii *GeneralInterface) GetInterface() { +} + +func (ii *GeneralInterface) GetArray() []StackItem { + return []StackItem{} +} diff --git a/vm/types/integer.go b/vm/types/integer.go new file mode 100644 index 000000000..7be2a876b --- /dev/null +++ b/vm/types/integer.go @@ -0,0 +1,53 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "math/big" +) + +type Integer struct { + value *big.Int +} + +func NewInteger(value *big.Int) *Integer { + var i Integer + i.value = value + return &i +} + +func (i *Integer) Equals(other StackItem) bool { + if _, ok := other.(*Integer); !ok { + return false + } + if i.value.Cmp(other.GetBigInteger()) != 0 { + return false + } + return true +} + +func (i *Integer) GetBigInteger() *big.Int { + return i.value +} + +func (i *Integer) GetBoolean() bool { + if i.value.Cmp(big.NewInt(0)) == 0 { + return false + } + return true +} + +func (i *Integer) GetByteArray() []byte { + return i.value.Bytes() +} + +func (i *Integer) GetInterface() { + +} + +func (i *Integer) GetArray() []StackItem { + return []StackItem{i} +} diff --git a/vm/types/stackitem.go b/vm/types/stackitem.go new file mode 100644 index 000000000..efe1a51d7 --- /dev/null +++ b/vm/types/stackitem.go @@ -0,0 +1,19 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "math/big" +) + +type StackItem interface { + Equals(other StackItem) bool + GetBigInteger() *big.Int + GetBoolean() bool + GetByteArray() []byte + GetInterface() + GetArray() []StackItem +} diff --git a/vm/types/types_test.go b/vm/types/types_test.go new file mode 100644 index 000000000..8df582238 --- /dev/null +++ b/vm/types/types_test.go @@ -0,0 +1,23 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package types + +import ( + "math/big" + "testing" +) + +func TestTypes(t *testing.T) { + i := NewInteger(big.NewInt(1)) + ba := NewByteArray([]byte{1}) + b := NewBoolean(false) + a1 := NewArray([]StackItem{i}) + //a2 := NewArray([]StackItem{ba}) + t.Log(i.GetByteArray()) + t.Log(ba.GetBoolean()) + t.Log(b.Equals(NewBoolean(false))) + t.Log(a1.Equals(NewArray([]StackItem{NewInteger(big.NewInt(1))}))) +} diff --git a/vm/utils/stack.go b/vm/utils/stack.go new file mode 100644 index 000000000..6b75bf481 --- /dev/null +++ b/vm/utils/stack.go @@ -0,0 +1,81 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package utils + +type RandomAccessStack struct { + Element []interface{} +} + +func NewRandAccessStack() *RandomAccessStack { + var ras RandomAccessStack + ras.Element = make([]interface{}, 0) + return &ras +} + +func (ras *RandomAccessStack) Count() int { + return len(ras.Element) +} + +func (ras *RandomAccessStack) Insert(index int, t interface{}) { + l := len(ras.Element) + if index > l { + return + } + if index == 0 { + ras.Element = append(ras.Element, t) + return + } + + var array = make([]interface{}, 0, l+1) + index = l - index + array = append(array, ras.Element[:index]) + array = append(array, t) + array = append(array, ras.Element[index:]...) + + ras.Element = array +} + +func (ras *RandomAccessStack) Peek(index int) interface{} { + l := len(ras.Element) + if index >= l { + return nil + } + index = l - index + return ras.Element[index-1] +} + +func (ras *RandomAccessStack) Remove(index int) interface{} { + l := len(ras.Element) + if index >= l { + return nil + } + index = l - index + e := ras.Element[index-1] + var si []interface{} + si = append(ras.Element[:index-1], ras.Element[index:]...) + ras.Element = si + return e +} + +func (ras *RandomAccessStack) Set(index int, t interface{}) { + l := len(ras.Element) + if index >= l { + return + } + ras.Element[index] = t +} + +func (ras *RandomAccessStack) Push(t interface{}) { + ras.Insert(0, t) +} + +func (ras *RandomAccessStack) Pop() interface{} { + return ras.Remove(0) +} + +func (ras *RandomAccessStack) Swap(i, j int) { + ras.Element[i], ras.Element[j] = ras.Element[j], ras.Element[i] +} diff --git a/vm/utils/stack_test.go b/vm/utils/stack_test.go new file mode 100644 index 000000000..227547e93 --- /dev/null +++ b/vm/utils/stack_test.go @@ -0,0 +1,51 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package utils + +import ( + "fmt" + "reflect" + "runtime" + "testing" +) + +func assertEqual(t *testing.T, exp, got interface{}) { + res := reflect.DeepEqual(exp, got) + if res == false { + err := fmt.Sprint("Error: expect ", exp, " got ", got) + + _, file, line, _ := runtime.Caller(1) + t.Errorf("%s:%d %s", file, line, err) + } +} + +func TestRandomAccessStack(t *testing.T) { + + var stack = NewRandAccessStack() + assertEqual(t, stack.Count(), 0) + for i := 0; i < 10; i++ { + stack.Push(i) + assertEqual(t, stack.Count(), i+1) + } + + for i := 9; i >= 0; i-- { + elem := stack.Pop() + assertEqual(t, elem.(int), i) + } + assertEqual(t, stack.Count(), 0) + + for i := 0; i < 10; i++ { + stack.Insert(i, i) + assertEqual(t, stack.Peek(i).(int), i) + assertEqual(t, stack.Peek(0).(int), 0) + } + + for i := 0; i < 10; i++ { + stack.Set(i, i+1) + assertEqual(t, stack.Peek(i).(int), i+1) + } + +} diff --git a/vm/utils/vm_reader.go b/vm/utils/vm_reader.go new file mode 100755 index 000000000..892a4e4b2 --- /dev/null +++ b/vm/utils/vm_reader.go @@ -0,0 +1,112 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package utils + +import ( + "bytes" + "encoding/binary" +) + +type VmReader struct { + reader *bytes.Reader + BaseStream []byte +} + +func NewVmReader(b []byte) *VmReader { + var vmreader VmReader + vmreader.reader = bytes.NewReader(b) + vmreader.BaseStream = b + return &vmreader +} + +func (r *VmReader) ReadByte() (byte, error) { + byte, err := r.reader.ReadByte() + return byte, err +} + +func (r *VmReader) ReadBytes(count int) []byte { + var bytes []byte + for i := 0; i < count; i++ { + d, _ := r.ReadByte() + bytes = append(bytes, d) + } + return bytes +} + +func (r *VmReader) ReadUint16() uint16 { + b := r.ReadBytes(2) + return binary.LittleEndian.Uint16(b) +} + +func (r *VmReader) ReadUInt32() uint32 { + b := r.ReadBytes(4) + return binary.LittleEndian.Uint32(b) +} + +func (r *VmReader) ReadUInt64() uint64 { + b := r.ReadBytes(8) + return binary.LittleEndian.Uint64(b) +} + +func (r *VmReader) ReadInt16() int16 { + b := r.ReadBytes(2) + bytesBuffer := bytes.NewBuffer(b) + var vi int16 + binary.Read(bytesBuffer, binary.BigEndian, &vi) + return vi + +} + +func (r *VmReader) ReadInt32() int32 { + b := r.ReadBytes(4) + bytesBuffer := bytes.NewBuffer(b) + var vi int32 + binary.Read(bytesBuffer, binary.BigEndian, &vi) + return vi +} + +func (r *VmReader) Position() int { + return int(r.reader.Size()) - r.reader.Len() +} + +func (r *VmReader) Length() int { + return r.reader.Len() +} + +func (r *VmReader) Seek(offset int64, whence int) (int64, error) { + return r.reader.Seek(offset, whence) +} + +func (r *VmReader) ReadVarBytes(max int) []byte { + n := int(r.ReadVarInt(uint64(max))) + return r.ReadBytes(n) +} + +func (r *VmReader) ReadVarInt(max uint64) uint64 { + fb, _ := r.ReadByte() + var value uint64 + + switch fb { + case 0xFD: + value = uint64(r.ReadInt16()) + case 0xFE: + value = uint64(r.ReadUInt32()) + case 0xFF: + value = uint64(r.ReadUInt64()) + default: + value = uint64(fb) + } + if value > max { + return 0 + } + return value +} + +func (r *VmReader) ReadVarString() string { + bs := r.ReadVarBytes(0X7fffffc7) + return string(bs) + //return Encoding.UTF8.GetString(reader.ReadVarBytes()); +} diff --git a/vm/utils/vmreader_test.go b/vm/utils/vmreader_test.go new file mode 100755 index 000000000..b3cfe0364 --- /dev/null +++ b/vm/utils/vmreader_test.go @@ -0,0 +1,46 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package utils + +import ( + "testing" +) + +func TestExampleVmReader(t *testing.T) { + vr := NewVmReader([]byte{0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0x10, 0x11, 0x12, 0x13}) + vr1 := NewVmReader([]byte{0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa}) + + t.Log("NewVmReader() test:", vr) + t.Log("NewVmReader() test:", vr.BaseStream) + + //bt := vr.ReadByte() + //t.Log( "ReadByte() test:", bt,vr.ReadByte() ) + + bb := vr.ReadBytes(4) + t.Log("ReadBytes() test:", bb) + + t.Log("ReadUint16() test:", vr.ReadUint16()) + + t.Log("ReadUInt32() test:", vr.ReadUInt32()) + + t.Log("ReadUInt64() test:", vr.ReadUInt64()) + + t.Log("ReadInt16() test:", vr1.ReadInt16()) + + t.Log("ReadInt32() test:", vr1.ReadInt32()) + + t.Log("Position() test:", vr1.Position()) + + t.Log("Length() test:", vr1.Length()) + + offset, _ := vr1.Seek(1, 1) + t.Log("Seek() test:", offset) + + //bb1 := vr1.ReadVarInt( 999 ) + //t.Log( "ReadVarInt() test:", bb1 ) + + // output: ok +} diff --git a/vm/vm_state.go b/vm/vm_state.go new file mode 100755 index 000000000..f63c814ab --- /dev/null +++ b/vm/vm_state.go @@ -0,0 +1,17 @@ +// Copyright (c) 2017-2022 The Elastos Foundation +// Use of this source code is governed by an MIT +// license that can be found in the LICENSE file. +// + +package vm + +type VMState byte + +const ( + NONE VMState = 0 + HALT VMState = 1 << 0 + FAULT VMState = 1 << 1 + BREAK VMState = 1 << 2 + + INSUFFICIENT_RESOURCE VMState = 1 << 4 +) From f1fa8c88410644df0b208f9ad15c5710339131ff Mon Sep 17 00:00:00 2001 From: jiangzehua <1092431698@qq.com> Date: Wed, 6 Jul 2022 12:12:29 +0800 Subject: [PATCH 2/4] feat(dpos2.0): update license time --- account/account.go | 2 +- account/client.go | 2 +- account/common.go | 2 +- account/fileStore.go | 2 +- auxpow/auxpow.go | 2 +- auxpow/auxpow_test.go | 2 +- auxpow/btcfaker.go | 2 +- auxpow/btcheader.go | 2 +- auxpow/btctx.go | 2 +- benchmark/common/cli/flags.go | 2 +- benchmark/common/tx/fixamontassigner.go | 2 +- benchmark/common/tx/interface.go | 2 +- benchmark/common/tx/nochangesevenassigner.go | 2 +- benchmark/common/tx/transferasset.go | 2 +- benchmark/common/utils/random.go | 2 +- benchmark/common/utils/sign.go | 2 +- benchmark/process/runtoheight_test.go | 2 +- benchmark/process/singleblock_test.go | 2 +- benchmark/profile/cpu.go | 2 +- benchmark/profile/gc.go | 2 +- benchmark/profile/profile.go | 2 +- benchmark/profile/trace.go | 2 +- benchmark/special/serialize_test.go | 2 +- benchmark/sync/synctobestheight_test.go | 2 +- benchmark/tools/generator/chain/datagen.go | 2 +- benchmark/tools/generator/chain/params.go | 2 +- benchmark/tools/generator/chain/params_test.go | 2 +- benchmark/tools/generator/chain/txrepository.go | 2 +- benchmark/tools/generator/chain/txrepository_test.go | 2 +- benchmark/tools/generator/chain/utils.go | 2 +- benchmark/tools/generator/main.go | 2 +- benchmark/tools/inputcounter/calculator/calculator.go | 2 +- .../tools/inputcounter/calculator/multiinputsofoneaccount.go | 2 +- benchmark/tools/inputcounter/calculator/singleinputoutput.go | 2 +- benchmark/tools/inputcounter/main.go | 2 +- blockchain/blockchain.go | 2 +- blockchain/blockindex.go | 2 +- blockchain/blockvalidator.go | 2 +- blockchain/chainio.go | 2 +- blockchain/chainstore.go | 2 +- blockchain/chainstoreffldb.go | 2 +- blockchain/confirmvalidator.go | 2 +- blockchain/confirmvalidator_test.go | 2 +- blockchain/dataentryprefix.go | 2 +- blockchain/difficulty.go | 2 +- blockchain/difficulty_test.go | 2 +- blockchain/indexers/checkpoint.go | 2 +- blockchain/indexers/common.go | 2 +- blockchain/indexers/manager.go | 2 +- blockchain/indexers/txcache.go | 2 +- blockchain/indexers/txindex.go | 2 +- blockchain/indexers/unspentindex.go | 2 +- blockchain/indexers/utxoindex.go | 2 +- blockchain/iterator.go | 2 +- blockchain/ledger.go | 2 +- blockchain/ledgerstore.go | 2 +- blockchain/leveldb.go | 2 +- blockchain/reward_test.go | 2 +- blockchain/store.go | 2 +- blockchain/txvalidator.go | 2 +- blockchain/upgrade.go | 2 +- blockchain/utxocache.go | 2 +- blockchain/validation.go | 2 +- blockchain/weight.go | 2 +- cmd/common/common.go | 2 +- cmd/common/flags.go | 2 +- cmd/common/print.go | 2 +- cmd/ela-cli.go | 2 +- cmd/info/info.go | 2 +- cmd/mine/mine.go | 2 +- cmd/rollback/rollback.go | 2 +- cmd/script/api/accounttype.go | 2 +- cmd/script/api/api.go | 2 +- cmd/script/api/arbitrators.go | 2 +- cmd/script/api/attribute.go | 2 +- cmd/script/api/block.go | 2 +- cmd/script/api/clienttype.go | 2 +- cmd/script/api/confirm.go | 2 +- cmd/script/api/dposmanager.go | 2 +- cmd/script/api/dposnetwork.go | 2 +- cmd/script/api/header.go | 2 +- cmd/script/api/illegalblocks.go | 2 +- cmd/script/api/illegalproposals.go | 2 +- cmd/script/api/illegalvotes.go | 2 +- cmd/script/api/inputtype.go | 2 +- cmd/script/api/mock/dposnetwork.go | 2 +- cmd/script/api/mock/peer.go | 2 +- cmd/script/api/outputtype.go | 2 +- cmd/script/api/payloadtype.go | 2 +- cmd/script/api/program.go | 2 +- cmd/script/api/proposal.go | 2 +- cmd/script/api/strings.go | 2 +- cmd/script/api/txtype.go | 2 +- cmd/script/api/vote.go | 2 +- cmd/script/script.go | 2 +- cmd/wallet/account.go | 2 +- cmd/wallet/common.go | 2 +- cmd/wallet/transaction.go | 2 +- cmd/wallet/txbuilder.go | 2 +- cmd/wallet/wallet.go | 2 +- common/common.go | 2 +- common/common_test.go | 2 +- common/config/config.go | 2 +- common/config/params.go | 2 +- common/config/params_test.go | 2 +- common/config/settings/settings.go | 2 +- common/error.go | 2 +- common/fixed64.go | 2 +- common/log/log.go | 2 +- common/serialize.go | 2 +- common/uint160.go | 2 +- common/uint168.go | 2 +- common/uint168_test.go | 2 +- common/uint256.go | 2 +- common/uint256_test.go | 2 +- core/checkpoint/channels.go | 2 +- core/checkpoint/channels_test.go | 2 +- core/checkpoint/manager.go | 2 +- core/checkpoint/manager_test.go | 2 +- core/contract/common.go | 2 +- core/contract/contract.go | 2 +- core/contract/contract_test.go | 2 +- core/contract/crdid.go | 2 +- core/contract/crosschain.go | 2 +- core/contract/multisig.go | 2 +- core/contract/pledge.go | 2 +- core/contract/program/program.go | 2 +- core/contract/program/programbuilder.go | 2 +- core/contract/standard.go | 2 +- core/transaction/log.go | 2 +- core/transaction/transaction.go | 2 +- core/types/block.go | 2 +- core/types/common/attribute.go | 2 +- core/types/common/header.go | 2 +- core/types/common/input.go | 2 +- core/types/common/outpoint.go | 2 +- core/types/common/output.go | 2 +- core/types/common/output_test.go | 2 +- core/types/common/utxo.go | 2 +- core/types/dposblock.go | 2 +- core/types/dposheader.go | 2 +- core/types/outputpayload/crosschain.go | 2 +- core/types/outputpayload/default.go | 2 +- core/types/outputpayload/mapping.go | 2 +- core/types/outputpayload/mapping_test.go | 2 +- core/types/outputpayload/returnsidechaindeposit.go | 2 +- core/types/outputpayload/stake.go | 2 +- core/types/outputpayload/vote.go | 2 +- core/types/outputpayload/vote_test.go | 2 +- core/types/outputpayload/withdraw.go | 2 +- core/types/payload/activateproducer.go | 2 +- core/types/payload/asset.go | 2 +- core/types/payload/coinbase.go | 2 +- core/types/payload/confirm.go | 2 +- core/types/payload/crassetsrectify.go | 2 +- core/types/payload/crcappropriation.go | 2 +- core/types/payload/crcproposal.go | 2 +- core/types/payload/crcproposalrealwithdraw.go | 2 +- core/types/payload/crcproposalreview.go | 2 +- core/types/payload/crcproposaltracking.go | 2 +- core/types/payload/crcproposalwithdraw.go | 2 +- core/types/payload/crinfo.go | 2 +- core/types/payload/dposillegalblocks.go | 2 +- core/types/payload/dposillegaldata.go | 2 +- core/types/payload/dposillegalproposals.go | 2 +- core/types/payload/dposillegalvotes.go | 2 +- core/types/payload/dposproposal.go | 2 +- core/types/payload/dposproposalvote.go | 2 +- core/types/payload/dposv2claimreward.go | 2 +- core/types/payload/dposv2claimrewardrealwithdraw.go | 2 +- core/types/payload/inactivearbitrators.go | 2 +- core/types/payload/processproducer.go | 2 +- core/types/payload/producerinfo.go | 2 +- core/types/payload/record.go | 2 +- core/types/payload/registerasset.go | 2 +- core/types/payload/returnpledgecoin.go | 2 +- core/types/payload/returnsidechaindepositcoin.go | 2 +- core/types/payload/reverttodpos.go | 2 +- core/types/payload/reverttopow.go | 2 +- core/types/payload/sidechainillegaldata.go | 2 +- core/types/payload/sidechainpow.go | 2 +- core/types/payload/transferasset.go | 2 +- core/types/payload/transfercrosschainasset.go | 2 +- core/types/payload/unregistercr.go | 2 +- core/types/payload/updateversion.go | 2 +- core/types/payload/withdrawfromsidechain.go | 2 +- cr/state/ICRRecord.go | 2 +- cr/state/candidate.go | 2 +- cr/state/checkpoint.go | 2 +- cr/state/committee.go | 2 +- cr/state/committeeaction.go | 2 +- cr/state/keyframe.go | 2 +- cr/state/log.go | 2 +- cr/state/proposalmanager.go | 2 +- cr/state/proposalmanager_test.go | 2 +- cr/state/state.go | 2 +- crypto/aes.go | 2 +- crypto/common.go | 2 +- crypto/crypto.go | 2 +- crypto/crypto_test.go | 2 +- crypto/encode.go | 2 +- crypto/merkletree.go | 2 +- crypto/schnorr.go | 2 +- database/doc.go | 2 +- database/driver.go | 2 +- database/driver_test.go | 2 +- database/error.go | 2 +- database/error_test.go | 2 +- database/export_test.go | 2 +- database/ffldb/blockio.go | 2 +- database/ffldb/db.go | 2 +- database/ffldb/dbcache.go | 2 +- database/ffldb/doc.go | 2 +- database/ffldb/driver.go | 2 +- database/ffldb/ldbtreapiter.go | 2 +- database/ffldb/reconcile.go | 2 +- database/interface.go | 2 +- database/internal/treap/common.go | 2 +- database/internal/treap/common_test.go | 2 +- database/internal/treap/doc.go | 2 +- database/internal/treap/immutable.go | 2 +- database/internal/treap/immutable_test.go | 2 +- database/internal/treap/mutable.go | 2 +- database/internal/treap/mutable_test.go | 2 +- database/internal/treap/treapiter.go | 2 +- database/internal/treap/treapiter_test.go | 2 +- dpos/account/account.go | 2 +- dpos/arbitrator.go | 2 +- dpos/log/eventlogs.go | 2 +- dpos/log/eventmonitor.go | 2 +- dpos/log/log.go | 2 +- dpos/manager/consensus.go | 2 +- dpos/manager/consensusblockcache.go | 2 +- dpos/manager/dposhandlerswitch.go | 2 +- dpos/manager/dposmanager.go | 2 +- dpos/manager/dposnormalhandler.go | 2 +- dpos/manager/dposondutyhandler.go | 2 +- dpos/manager/eventanalyzer.go | 2 +- dpos/manager/evidencecache.go | 2 +- dpos/manager/illegalbehaviormonitor.go | 2 +- dpos/manager/proposaldispatcher.go | 2 +- dpos/manager/view.go | 2 +- dpos/manager/viewchangescountdown.go | 2 +- dpos/network.go | 2 +- dpos/p2p/addrmgr/addrmanager.go | 2 +- dpos/p2p/addrmgr/addrmanager_test.go | 2 +- dpos/p2p/addrmgr/log.go | 2 +- dpos/p2p/config.go | 2 +- dpos/p2p/connmgr/connmanager.go | 2 +- dpos/p2p/connmgr/log.go | 2 +- dpos/p2p/hub/conn.go | 2 +- dpos/p2p/hub/hub.go | 2 +- dpos/p2p/hub/hub_test.go | 2 +- dpos/p2p/hub/log.go | 2 +- dpos/p2p/interface.go | 2 +- dpos/p2p/log.go | 2 +- dpos/p2p/msg/addr.go | 2 +- dpos/p2p/msg/commands.go | 2 +- dpos/p2p/msg/consensusstatus.go | 2 +- dpos/p2p/msg/getblock.go | 2 +- dpos/p2p/msg/getblocks.go | 2 +- dpos/p2p/msg/illegalproposals.go | 2 +- dpos/p2p/msg/illegalvotes.go | 2 +- dpos/p2p/msg/inventory.go | 2 +- dpos/p2p/msg/ping.go | 2 +- dpos/p2p/msg/pong.go | 2 +- dpos/p2p/msg/proposal.go | 2 +- dpos/p2p/msg/reject.go | 2 +- dpos/p2p/msg/requestconsensus.go | 2 +- dpos/p2p/msg/requestproposal.go | 2 +- dpos/p2p/msg/resetview.go | 2 +- dpos/p2p/msg/responseblocks.go | 2 +- dpos/p2p/msg/responseconsensus.go | 2 +- dpos/p2p/msg/responseinactivearbitrators.go | 2 +- dpos/p2p/msg/responsereverttodpos.go | 2 +- dpos/p2p/msg/sidechainillegaldata.go | 2 +- dpos/p2p/msg/verack.go | 2 +- dpos/p2p/msg/version.go | 2 +- dpos/p2p/msg/vote.go | 2 +- dpos/p2p/notifier.go | 2 +- dpos/p2p/notifier_test.go | 2 +- dpos/p2p/server.go | 2 +- dpos/p2p/server_test.go | 2 +- dpos/state/arbitermember.go | 2 +- dpos/state/arbitermember_test.go | 2 +- dpos/state/arbitrators.go | 2 +- dpos/state/arbitratorsmock.go | 2 +- dpos/state/checkpoint.go | 2 +- dpos/state/crarbiter_test.go | 2 +- dpos/state/crcarbiter.go | 2 +- dpos/state/degradation.go | 2 +- dpos/state/dposarbiter.go | 2 +- dpos/state/dposarbiter_test.go | 2 +- dpos/state/heightversion.go | 2 +- dpos/state/interface.go | 2 +- dpos/state/keyframe.go | 2 +- dpos/state/log.go | 2 +- dpos/state/originarbiter.go | 2 +- dpos/state/originarbiter_test.go | 2 +- dpos/state/state.go | 2 +- elanet/dns/dns.go | 2 +- elanet/dns/dns_test.go | 2 +- elanet/dns/log.go | 2 +- elanet/dns/main/main.go | 2 +- elanet/filter/customidfilter/customidfilter.go | 2 +- elanet/filter/filter.go | 2 +- elanet/filter/merkleblock.go | 2 +- elanet/filter/nextturndposfilter/nextturndposfilter.go | 2 +- .../returnsidechaindepositecoinfilter.go | 2 +- elanet/filter/sidefilter/sidefilter.go | 2 +- elanet/filter/upgradefilter/upgradefilter.go | 2 +- elanet/interface.go | 2 +- elanet/log.go | 2 +- elanet/netsync/interface.go | 2 +- elanet/netsync/log.go | 2 +- elanet/netsync/manager.go | 2 +- elanet/pact/protocol.go | 2 +- elanet/peer/log.go | 2 +- elanet/peer/mruinvmap.go | 2 +- elanet/peer/mruinvmap_test.go | 2 +- elanet/peer/peer.go | 2 +- elanet/routes/log.go | 2 +- elanet/routes/routes.go | 2 +- elanet/routes/routes_test.go | 2 +- elanet/server.go | 2 +- errors/elaerror.go | 2 +- errors/errcode.go | 2 +- errors/errcode_test.go | 2 +- errors/errmap.go | 2 +- errors/errmap_test.go | 2 +- errors/jsonformat.go | 2 +- errors/jsonformat_test.go | 2 +- events/events.go | 2 +- events/events_test.go | 2 +- log.go | 2 +- main.go | 2 +- mempool/blockevidence.go | 2 +- mempool/blockpool.go | 2 +- mempool/conflictfunc.go | 2 +- mempool/conflictmanager.go | 2 +- mempool/conflictmanager_test.go | 2 +- mempool/conflictslot.go | 2 +- mempool/conflictslot_test.go | 2 +- mempool/txfeeorderedlist.go | 2 +- mempool/txfeeorderedlist_bench_test.go | 2 +- mempool/txfeeorderedlist_test.go | 2 +- mempool/txpool.go | 2 +- mempool/txpool_test.go | 2 +- mempool/txpoolcheckpoint.go | 2 +- p2p/addrmgr/addrmanager.go | 2 +- p2p/addrmgr/addrmanager_test.go | 2 +- p2p/addrmgr/internal_test.go | 2 +- p2p/addrmgr/knownaddress.go | 2 +- p2p/addrmgr/knownaddress_test.go | 2 +- p2p/addrmgr/log.go | 2 +- p2p/addrmgr/network.go | 2 +- p2p/addrmgr/network_test.go | 2 +- p2p/connmgr/connmanager.go | 2 +- p2p/connmgr/connmanager_test.go | 2 +- p2p/connmgr/dynamicbanscore.go | 2 +- p2p/connmgr/dynamicbanscore_test.go | 2 +- p2p/connmgr/log.go | 2 +- p2p/connmgr/tor.go | 2 +- p2p/header.go | 2 +- p2p/message.go | 2 +- p2p/msg/addr.go | 2 +- p2p/msg/block.go | 2 +- p2p/msg/daddr.go | 2 +- p2p/msg/empty.go | 2 +- p2p/msg/filteradd.go | 2 +- p2p/msg/filterclear.go | 2 +- p2p/msg/filterload.go | 2 +- p2p/msg/getaddr.go | 2 +- p2p/msg/getblocks.go | 2 +- p2p/msg/getdata.go | 2 +- p2p/msg/inv.go | 2 +- p2p/msg/invvect.go | 2 +- p2p/msg/mempool.go | 2 +- p2p/msg/merkleblock.go | 2 +- p2p/msg/notfound.go | 2 +- p2p/msg/ping.go | 2 +- p2p/msg/pong.go | 2 +- p2p/msg/reject.go | 2 +- p2p/msg/tx.go | 2 +- p2p/msg/txfilterload.go | 2 +- p2p/msg/verack.go | 2 +- p2p/msg/version.go | 2 +- p2p/nafilter.go | 2 +- p2p/netaddress.go | 2 +- p2p/peer/log.go | 2 +- p2p/peer/peer.go | 2 +- p2p/server/config.go | 2 +- p2p/server/interface.go | 2 +- p2p/server/log.go | 2 +- p2p/server/mrunoncemap.go | 2 +- p2p/server/mrunoncemap_test.go | 2 +- p2p/server/seed.go | 2 +- p2p/server/server.go | 2 +- pow/revertlistener.go | 2 +- pow/service.go | 2 +- pow/service_test.go | 2 +- servers/common.go | 2 +- servers/errors/errcode.go | 2 +- servers/errors/errcode_test.go | 2 +- servers/httpjsonrpc/server.go | 2 +- servers/httpnodeinfo/server.go | 2 +- servers/httpnodeinfo/template.go | 2 +- servers/httprestful/router.go | 2 +- servers/httprestful/server.go | 2 +- servers/httpwebsocket/server.go | 2 +- servers/httpwebsocket/session.go | 2 +- servers/interfaces.go | 2 +- servers/params.go | 2 +- test/unit/arbitrators_test.go | 2 +- test/unit/arbitratorsrollback_test.go | 2 +- test/unit/blockvalidator_test.go | 2 +- test/unit/candidate_test.go | 2 +- test/unit/chainstore_test.go | 2 +- test/unit/committee_test.go | 2 +- test/unit/committeerollback_test.go | 2 +- test/unit/crkeyframe_test.go | 2 +- test/unit/dposkeyframe_test.go | 2 +- test/unit/dposstate_test.go | 2 +- test/unit/heightversion_test.go | 2 +- test/unit/returndepositindex_test.go | 2 +- test/unit/reward_test.go | 2 +- test/unit/server_test.go | 2 +- test/unit/state_test.go | 2 +- test/unit/transaction_test.go | 2 +- test/unit/txvalidator_specailtx_test.go | 2 +- test/unit/txvalidator_test.go | 2 +- test/unit/unspentindex_test.go | 2 +- test/unit/utxocache_test.go | 2 +- test/unit/utxoindex_test.go | 2 +- test/unit/validation_test.go | 2 +- utils/common.go | 2 +- utils/elalog/filewriter.go | 2 +- utils/elalog/interface.go | 2 +- utils/elalog/log.go | 2 +- utils/gpath/gpath.go | 2 +- utils/gpath/gpath_test.go | 2 +- utils/history.go | 2 +- utils/history_test.go | 2 +- utils/http/error.go | 2 +- utils/http/jsonrpc/server.go | 2 +- utils/http/jsonrpc/server_test.go | 2 +- utils/http/jsonrpc/util.go | 2 +- utils/http/params.go | 2 +- utils/http/restful/route.go | 2 +- utils/http/restful/server.go | 2 +- utils/http/restful/server_test.go | 2 +- utils/signal/interrupt.go | 2 +- utils/test/test.go | 2 +- wallet/coin.go | 2 +- wallet/coin_test.go | 2 +- wallet/coincheckpoint.go | 2 +- wallet/coincheckpoint_test.go | 2 +- wallet/common.go | 2 +- wallet/ownedcoins.go | 2 +- wallet/ownedcoins_test.go | 2 +- wallet/wallet.go | 2 +- wallet/wallet_test.go | 2 +- 462 files changed, 462 insertions(+), 462 deletions(-) diff --git a/account/account.go b/account/account.go index 6d4b4b51a..f88f63beb 100644 --- a/account/account.go +++ b/account/account.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/account/client.go b/account/client.go index 5da221cd6..edcef64fb 100644 --- a/account/client.go +++ b/account/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/account/common.go b/account/common.go index f6b1bb22b..301d47157 100644 --- a/account/common.go +++ b/account/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/account/fileStore.go b/account/fileStore.go index f5c16aa90..aa5456deb 100644 --- a/account/fileStore.go +++ b/account/fileStore.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/auxpow/auxpow.go b/auxpow/auxpow.go index 9051ffe41..32360207e 100644 --- a/auxpow/auxpow.go +++ b/auxpow/auxpow.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/auxpow/auxpow_test.go b/auxpow/auxpow_test.go index a26afe6a7..9349c9d15 100644 --- a/auxpow/auxpow_test.go +++ b/auxpow/auxpow_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/auxpow/btcfaker.go b/auxpow/btcfaker.go index 455815377..8542df6fc 100644 --- a/auxpow/btcfaker.go +++ b/auxpow/btcfaker.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/auxpow/btcheader.go b/auxpow/btcheader.go index e4090566d..6ec2c6e70 100644 --- a/auxpow/btcheader.go +++ b/auxpow/btcheader.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/auxpow/btctx.go b/auxpow/btctx.go index 5f5ec3fa8..372a53b03 100644 --- a/auxpow/btctx.go +++ b/auxpow/btctx.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/cli/flags.go b/benchmark/common/cli/flags.go index 19e888404..e1522a9fc 100644 --- a/benchmark/common/cli/flags.go +++ b/benchmark/common/cli/flags.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/tx/fixamontassigner.go b/benchmark/common/tx/fixamontassigner.go index 90ea6c826..8bb3b4992 100644 --- a/benchmark/common/tx/fixamontassigner.go +++ b/benchmark/common/tx/fixamontassigner.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/tx/interface.go b/benchmark/common/tx/interface.go index 985dabb1f..7d37fa066 100644 --- a/benchmark/common/tx/interface.go +++ b/benchmark/common/tx/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/tx/nochangesevenassigner.go b/benchmark/common/tx/nochangesevenassigner.go index 40c8de51b..78ff597a9 100644 --- a/benchmark/common/tx/nochangesevenassigner.go +++ b/benchmark/common/tx/nochangesevenassigner.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/tx/transferasset.go b/benchmark/common/tx/transferasset.go index 992685468..85c285fa9 100644 --- a/benchmark/common/tx/transferasset.go +++ b/benchmark/common/tx/transferasset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/utils/random.go b/benchmark/common/utils/random.go index a4ecca48f..0098e3d7f 100644 --- a/benchmark/common/utils/random.go +++ b/benchmark/common/utils/random.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/common/utils/sign.go b/benchmark/common/utils/sign.go index 19aad2e78..be70c7a05 100644 --- a/benchmark/common/utils/sign.go +++ b/benchmark/common/utils/sign.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/process/runtoheight_test.go b/benchmark/process/runtoheight_test.go index 29b90307b..8fa2c619c 100644 --- a/benchmark/process/runtoheight_test.go +++ b/benchmark/process/runtoheight_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/process/singleblock_test.go b/benchmark/process/singleblock_test.go index f0ad1ed8a..c1d351723 100644 --- a/benchmark/process/singleblock_test.go +++ b/benchmark/process/singleblock_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/profile/cpu.go b/benchmark/profile/cpu.go index db29d02f6..59fe76b8f 100644 --- a/benchmark/profile/cpu.go +++ b/benchmark/profile/cpu.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/profile/gc.go b/benchmark/profile/gc.go index 00a288aa4..19cd3a688 100644 --- a/benchmark/profile/gc.go +++ b/benchmark/profile/gc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/profile/profile.go b/benchmark/profile/profile.go index a7f71f564..dd7f8b459 100644 --- a/benchmark/profile/profile.go +++ b/benchmark/profile/profile.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/profile/trace.go b/benchmark/profile/trace.go index dca569963..8a9792ff9 100644 --- a/benchmark/profile/trace.go +++ b/benchmark/profile/trace.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/special/serialize_test.go b/benchmark/special/serialize_test.go index 695a1a1f6..bea36e2f5 100644 --- a/benchmark/special/serialize_test.go +++ b/benchmark/special/serialize_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/sync/synctobestheight_test.go b/benchmark/sync/synctobestheight_test.go index ddbcf5a68..517f68e13 100644 --- a/benchmark/sync/synctobestheight_test.go +++ b/benchmark/sync/synctobestheight_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/chain/datagen.go b/benchmark/tools/generator/chain/datagen.go index 94a3b7602..df6faad2c 100644 --- a/benchmark/tools/generator/chain/datagen.go +++ b/benchmark/tools/generator/chain/datagen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/chain/params.go b/benchmark/tools/generator/chain/params.go index 7d948e316..c26a61a0f 100644 --- a/benchmark/tools/generator/chain/params.go +++ b/benchmark/tools/generator/chain/params.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/chain/params_test.go b/benchmark/tools/generator/chain/params_test.go index bd55b6b8d..6a495dd41 100644 --- a/benchmark/tools/generator/chain/params_test.go +++ b/benchmark/tools/generator/chain/params_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/chain/txrepository.go b/benchmark/tools/generator/chain/txrepository.go index a1be2dece..10699be52 100644 --- a/benchmark/tools/generator/chain/txrepository.go +++ b/benchmark/tools/generator/chain/txrepository.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/chain/txrepository_test.go b/benchmark/tools/generator/chain/txrepository_test.go index 66cbed225..70e94e0f3 100644 --- a/benchmark/tools/generator/chain/txrepository_test.go +++ b/benchmark/tools/generator/chain/txrepository_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/chain/utils.go b/benchmark/tools/generator/chain/utils.go index e80b4eef9..e3c6f61c4 100644 --- a/benchmark/tools/generator/chain/utils.go +++ b/benchmark/tools/generator/chain/utils.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/generator/main.go b/benchmark/tools/generator/main.go index 498e5d46b..fb8c39945 100644 --- a/benchmark/tools/generator/main.go +++ b/benchmark/tools/generator/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/inputcounter/calculator/calculator.go b/benchmark/tools/inputcounter/calculator/calculator.go index 7547d7b22..fd3e8754f 100644 --- a/benchmark/tools/inputcounter/calculator/calculator.go +++ b/benchmark/tools/inputcounter/calculator/calculator.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/inputcounter/calculator/multiinputsofoneaccount.go b/benchmark/tools/inputcounter/calculator/multiinputsofoneaccount.go index 0486b641a..c939351d5 100644 --- a/benchmark/tools/inputcounter/calculator/multiinputsofoneaccount.go +++ b/benchmark/tools/inputcounter/calculator/multiinputsofoneaccount.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/inputcounter/calculator/singleinputoutput.go b/benchmark/tools/inputcounter/calculator/singleinputoutput.go index ada0aeb53..29081f257 100644 --- a/benchmark/tools/inputcounter/calculator/singleinputoutput.go +++ b/benchmark/tools/inputcounter/calculator/singleinputoutput.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/benchmark/tools/inputcounter/main.go b/benchmark/tools/inputcounter/main.go index 653d0e183..bd186001e 100644 --- a/benchmark/tools/inputcounter/main.go +++ b/benchmark/tools/inputcounter/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/blockchain.go b/blockchain/blockchain.go index 967c5dcd9..f45508133 100644 --- a/blockchain/blockchain.go +++ b/blockchain/blockchain.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/blockindex.go b/blockchain/blockindex.go index 74c11b518..b0ec52a83 100644 --- a/blockchain/blockindex.go +++ b/blockchain/blockindex.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/blockvalidator.go b/blockchain/blockvalidator.go index 1e0a11fd1..a0756dfec 100644 --- a/blockchain/blockvalidator.go +++ b/blockchain/blockvalidator.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/chainio.go b/blockchain/chainio.go index 66c3422bc..f0ac4a7ed 100644 --- a/blockchain/chainio.go +++ b/blockchain/chainio.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/chainstore.go b/blockchain/chainstore.go index 2a5ab9ca4..f3daceb42 100644 --- a/blockchain/chainstore.go +++ b/blockchain/chainstore.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/chainstoreffldb.go b/blockchain/chainstoreffldb.go index 1e382474e..62a673ab7 100644 --- a/blockchain/chainstoreffldb.go +++ b/blockchain/chainstoreffldb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/confirmvalidator.go b/blockchain/confirmvalidator.go index 8fdff1794..588cdfa4e 100644 --- a/blockchain/confirmvalidator.go +++ b/blockchain/confirmvalidator.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/confirmvalidator_test.go b/blockchain/confirmvalidator_test.go index 95d94879e..16600e4d3 100644 --- a/blockchain/confirmvalidator_test.go +++ b/blockchain/confirmvalidator_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/dataentryprefix.go b/blockchain/dataentryprefix.go index 9b7373e04..196df7956 100644 --- a/blockchain/dataentryprefix.go +++ b/blockchain/dataentryprefix.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/difficulty.go b/blockchain/difficulty.go index 1e96eb49f..94c6c3817 100644 --- a/blockchain/difficulty.go +++ b/blockchain/difficulty.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/difficulty_test.go b/blockchain/difficulty_test.go index 5818b0f35..751afe004 100644 --- a/blockchain/difficulty_test.go +++ b/blockchain/difficulty_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/checkpoint.go b/blockchain/indexers/checkpoint.go index 10af8cfde..22f16712d 100644 --- a/blockchain/indexers/checkpoint.go +++ b/blockchain/indexers/checkpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/common.go b/blockchain/indexers/common.go index 626885701..3f67b215a 100644 --- a/blockchain/indexers/common.go +++ b/blockchain/indexers/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/manager.go b/blockchain/indexers/manager.go index f5f2f3c8c..31b1552e7 100644 --- a/blockchain/indexers/manager.go +++ b/blockchain/indexers/manager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/txcache.go b/blockchain/indexers/txcache.go index 49f65a9ff..7ce2698a8 100644 --- a/blockchain/indexers/txcache.go +++ b/blockchain/indexers/txcache.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/txindex.go b/blockchain/indexers/txindex.go index 8fff2bbb6..4728fb80f 100644 --- a/blockchain/indexers/txindex.go +++ b/blockchain/indexers/txindex.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/unspentindex.go b/blockchain/indexers/unspentindex.go index 5804774e7..815c6cd6f 100644 --- a/blockchain/indexers/unspentindex.go +++ b/blockchain/indexers/unspentindex.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/indexers/utxoindex.go b/blockchain/indexers/utxoindex.go index e24496ca7..ec8a178c9 100644 --- a/blockchain/indexers/utxoindex.go +++ b/blockchain/indexers/utxoindex.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/iterator.go b/blockchain/iterator.go index 6d112f3cd..2032e1ea0 100644 --- a/blockchain/iterator.go +++ b/blockchain/iterator.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/ledger.go b/blockchain/ledger.go index ceffd4c91..f9db8f87a 100644 --- a/blockchain/ledger.go +++ b/blockchain/ledger.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/ledgerstore.go b/blockchain/ledgerstore.go index b67674338..4487e9a88 100644 --- a/blockchain/ledgerstore.go +++ b/blockchain/ledgerstore.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/leveldb.go b/blockchain/leveldb.go index 55b39afaf..2d8e5fe54 100644 --- a/blockchain/leveldb.go +++ b/blockchain/leveldb.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/reward_test.go b/blockchain/reward_test.go index 4eb253928..4f45ecc0c 100644 --- a/blockchain/reward_test.go +++ b/blockchain/reward_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/store.go b/blockchain/store.go index 52dc204e3..3505d0d3a 100644 --- a/blockchain/store.go +++ b/blockchain/store.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/txvalidator.go b/blockchain/txvalidator.go index 8d019a1c8..cb708d565 100644 --- a/blockchain/txvalidator.go +++ b/blockchain/txvalidator.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/upgrade.go b/blockchain/upgrade.go index ebd7d0e63..705106523 100644 --- a/blockchain/upgrade.go +++ b/blockchain/upgrade.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/utxocache.go b/blockchain/utxocache.go index cf8f6669d..35caf25b0 100644 --- a/blockchain/utxocache.go +++ b/blockchain/utxocache.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/validation.go b/blockchain/validation.go index 78d6c6955..c6e8cb312 100644 --- a/blockchain/validation.go +++ b/blockchain/validation.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/blockchain/weight.go b/blockchain/weight.go index 48cbaa60c..dfb810536 100644 --- a/blockchain/weight.go +++ b/blockchain/weight.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/common/common.go b/cmd/common/common.go index c576fc93c..80a757a93 100644 --- a/cmd/common/common.go +++ b/cmd/common/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/common/flags.go b/cmd/common/flags.go index 2d7746a7a..44de7b2e6 100644 --- a/cmd/common/flags.go +++ b/cmd/common/flags.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/common/print.go b/cmd/common/print.go index 26e49b7bd..d77d3222a 100644 --- a/cmd/common/print.go +++ b/cmd/common/print.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/ela-cli.go b/cmd/ela-cli.go index 7e6e5b443..f3be984de 100644 --- a/cmd/ela-cli.go +++ b/cmd/ela-cli.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/info/info.go b/cmd/info/info.go index 3d4df3fd1..0aed2c4cd 100644 --- a/cmd/info/info.go +++ b/cmd/info/info.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/mine/mine.go b/cmd/mine/mine.go index dd1b2d98d..3b91026bc 100644 --- a/cmd/mine/mine.go +++ b/cmd/mine/mine.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/rollback/rollback.go b/cmd/rollback/rollback.go index e88ae7180..8c799bfde 100644 --- a/cmd/rollback/rollback.go +++ b/cmd/rollback/rollback.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/accounttype.go b/cmd/script/api/accounttype.go index 04c8d764b..2d5124b02 100644 --- a/cmd/script/api/accounttype.go +++ b/cmd/script/api/accounttype.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/api.go b/cmd/script/api/api.go index 7ede3b647..39c5bf64a 100644 --- a/cmd/script/api/api.go +++ b/cmd/script/api/api.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/arbitrators.go b/cmd/script/api/arbitrators.go index 3d3897ca0..393a56586 100644 --- a/cmd/script/api/arbitrators.go +++ b/cmd/script/api/arbitrators.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/attribute.go b/cmd/script/api/attribute.go index fb45d359b..ae6d856f7 100644 --- a/cmd/script/api/attribute.go +++ b/cmd/script/api/attribute.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/block.go b/cmd/script/api/block.go index 68397bee0..80aad80fb 100644 --- a/cmd/script/api/block.go +++ b/cmd/script/api/block.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/clienttype.go b/cmd/script/api/clienttype.go index 5943d3b84..8707db88d 100644 --- a/cmd/script/api/clienttype.go +++ b/cmd/script/api/clienttype.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/confirm.go b/cmd/script/api/confirm.go index 63fc8c5e8..b33850c23 100644 --- a/cmd/script/api/confirm.go +++ b/cmd/script/api/confirm.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/dposmanager.go b/cmd/script/api/dposmanager.go index a23ea405e..56db7ccda 100644 --- a/cmd/script/api/dposmanager.go +++ b/cmd/script/api/dposmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/dposnetwork.go b/cmd/script/api/dposnetwork.go index fe2ab4b84..5fa391ebc 100644 --- a/cmd/script/api/dposnetwork.go +++ b/cmd/script/api/dposnetwork.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/header.go b/cmd/script/api/header.go index ef2684657..506ba8c21 100644 --- a/cmd/script/api/header.go +++ b/cmd/script/api/header.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/illegalblocks.go b/cmd/script/api/illegalblocks.go index 3e21de09b..9453de813 100644 --- a/cmd/script/api/illegalblocks.go +++ b/cmd/script/api/illegalblocks.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/illegalproposals.go b/cmd/script/api/illegalproposals.go index f693699c5..18efbc56f 100644 --- a/cmd/script/api/illegalproposals.go +++ b/cmd/script/api/illegalproposals.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/illegalvotes.go b/cmd/script/api/illegalvotes.go index eece1e9ce..ea509b961 100644 --- a/cmd/script/api/illegalvotes.go +++ b/cmd/script/api/illegalvotes.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/inputtype.go b/cmd/script/api/inputtype.go index 778f3c654..b7b2d6739 100644 --- a/cmd/script/api/inputtype.go +++ b/cmd/script/api/inputtype.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/mock/dposnetwork.go b/cmd/script/api/mock/dposnetwork.go index 91809df57..93dcc1e13 100644 --- a/cmd/script/api/mock/dposnetwork.go +++ b/cmd/script/api/mock/dposnetwork.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/mock/peer.go b/cmd/script/api/mock/peer.go index edc6bff06..3536a8bfa 100644 --- a/cmd/script/api/mock/peer.go +++ b/cmd/script/api/mock/peer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/outputtype.go b/cmd/script/api/outputtype.go index 7f09eecce..0771eebbf 100644 --- a/cmd/script/api/outputtype.go +++ b/cmd/script/api/outputtype.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/payloadtype.go b/cmd/script/api/payloadtype.go index 40f611c5b..f6344abc7 100644 --- a/cmd/script/api/payloadtype.go +++ b/cmd/script/api/payloadtype.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/program.go b/cmd/script/api/program.go index 17ff56c9b..6051a4a0a 100644 --- a/cmd/script/api/program.go +++ b/cmd/script/api/program.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/proposal.go b/cmd/script/api/proposal.go index 994b23016..15ae80f97 100644 --- a/cmd/script/api/proposal.go +++ b/cmd/script/api/proposal.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/strings.go b/cmd/script/api/strings.go index 5f997cf1f..627355acd 100644 --- a/cmd/script/api/strings.go +++ b/cmd/script/api/strings.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/txtype.go b/cmd/script/api/txtype.go index 570fb3c2c..70e3d02b6 100644 --- a/cmd/script/api/txtype.go +++ b/cmd/script/api/txtype.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/api/vote.go b/cmd/script/api/vote.go index c68c3e84f..38fe1bbd0 100644 --- a/cmd/script/api/vote.go +++ b/cmd/script/api/vote.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/script/script.go b/cmd/script/script.go index 7b5e8d433..6475457ff 100644 --- a/cmd/script/script.go +++ b/cmd/script/script.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/wallet/account.go b/cmd/wallet/account.go index 3de400805..67b06fbe6 100644 --- a/cmd/wallet/account.go +++ b/cmd/wallet/account.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/wallet/common.go b/cmd/wallet/common.go index 92fe32d4b..9a67e0dac 100644 --- a/cmd/wallet/common.go +++ b/cmd/wallet/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/wallet/transaction.go b/cmd/wallet/transaction.go index c8d361b51..36dbd1139 100644 --- a/cmd/wallet/transaction.go +++ b/cmd/wallet/transaction.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/wallet/txbuilder.go b/cmd/wallet/txbuilder.go index d40ba5fbc..e7140cd84 100644 --- a/cmd/wallet/txbuilder.go +++ b/cmd/wallet/txbuilder.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cmd/wallet/wallet.go b/cmd/wallet/wallet.go index 84b37dc6b..893a9f5d3 100644 --- a/cmd/wallet/wallet.go +++ b/cmd/wallet/wallet.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/common.go b/common/common.go index fa2500685..926acea6f 100644 --- a/common/common.go +++ b/common/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/common_test.go b/common/common_test.go index ecd7df76c..99b28aeef 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/config/config.go b/common/config/config.go index 3a4465f7b..71d3cfbc6 100644 --- a/common/config/config.go +++ b/common/config/config.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/config/params.go b/common/config/params.go index 5f0115416..68eeccd9e 100644 --- a/common/config/params.go +++ b/common/config/params.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/config/params_test.go b/common/config/params_test.go index 6ef080ebf..77a9e4378 100644 --- a/common/config/params_test.go +++ b/common/config/params_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/config/settings/settings.go b/common/config/settings/settings.go index fbebcc5f9..d7964569d 100644 --- a/common/config/settings/settings.go +++ b/common/config/settings/settings.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/error.go b/common/error.go index 38a861e27..6b8cc2266 100644 --- a/common/error.go +++ b/common/error.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/fixed64.go b/common/fixed64.go index 32dac7864..5983ad87f 100644 --- a/common/fixed64.go +++ b/common/fixed64.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/log/log.go b/common/log/log.go index a306be8b8..4fce5ed9a 100644 --- a/common/log/log.go +++ b/common/log/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/serialize.go b/common/serialize.go index f5892b1ad..b8cb97134 100644 --- a/common/serialize.go +++ b/common/serialize.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/uint160.go b/common/uint160.go index 2a1e30cb9..3ec931aae 100644 --- a/common/uint160.go +++ b/common/uint160.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/uint168.go b/common/uint168.go index bb9770d31..9849d5ed5 100644 --- a/common/uint168.go +++ b/common/uint168.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/uint168_test.go b/common/uint168_test.go index 402eff6fc..ad7436cec 100644 --- a/common/uint168_test.go +++ b/common/uint168_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/uint256.go b/common/uint256.go index 628d47a49..b2946bdf2 100644 --- a/common/uint256.go +++ b/common/uint256.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/common/uint256_test.go b/common/uint256_test.go index a2c4c7aef..412e72582 100644 --- a/common/uint256_test.go +++ b/common/uint256_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/checkpoint/channels.go b/core/checkpoint/channels.go index bb3227735..78be609a0 100644 --- a/core/checkpoint/channels.go +++ b/core/checkpoint/channels.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/checkpoint/channels_test.go b/core/checkpoint/channels_test.go index 53cb72d00..3c1cc256a 100644 --- a/core/checkpoint/channels_test.go +++ b/core/checkpoint/channels_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/checkpoint/manager.go b/core/checkpoint/manager.go index 785dec3af..3752e66fa 100644 --- a/core/checkpoint/manager.go +++ b/core/checkpoint/manager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/checkpoint/manager_test.go b/core/checkpoint/manager_test.go index 7edc6fc92..1f9589978 100644 --- a/core/checkpoint/manager_test.go +++ b/core/checkpoint/manager_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/common.go b/core/contract/common.go index 775b6fc5b..2844d50bc 100644 --- a/core/contract/common.go +++ b/core/contract/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/contract.go b/core/contract/contract.go index 19f78a5bf..a69130d06 100644 --- a/core/contract/contract.go +++ b/core/contract/contract.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/contract_test.go b/core/contract/contract_test.go index 64cf60f4b..a46c53548 100644 --- a/core/contract/contract_test.go +++ b/core/contract/contract_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/crdid.go b/core/contract/crdid.go index 2f0d2e84f..f5ee131a7 100644 --- a/core/contract/crdid.go +++ b/core/contract/crdid.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/crosschain.go b/core/contract/crosschain.go index 60a001af0..40f2b8cce 100644 --- a/core/contract/crosschain.go +++ b/core/contract/crosschain.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/multisig.go b/core/contract/multisig.go index 4a25e971e..e58b9d00b 100644 --- a/core/contract/multisig.go +++ b/core/contract/multisig.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/pledge.go b/core/contract/pledge.go index 2f2630e84..738dc8b99 100644 --- a/core/contract/pledge.go +++ b/core/contract/pledge.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/program/program.go b/core/contract/program/program.go index ba00cd4e3..fbb341491 100644 --- a/core/contract/program/program.go +++ b/core/contract/program/program.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/program/programbuilder.go b/core/contract/program/programbuilder.go index 1313218ba..6518524f0 100644 --- a/core/contract/program/programbuilder.go +++ b/core/contract/program/programbuilder.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/contract/standard.go b/core/contract/standard.go index 9d83ce028..53200f87c 100644 --- a/core/contract/standard.go +++ b/core/contract/standard.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/transaction/log.go b/core/transaction/log.go index 78d6d163a..063dab934 100644 --- a/core/transaction/log.go +++ b/core/transaction/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/transaction/transaction.go b/core/transaction/transaction.go index 7bcc93baf..b70cb6803 100644 --- a/core/transaction/transaction.go +++ b/core/transaction/transaction.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/block.go b/core/types/block.go index 593d7ab37..55b7727e3 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/attribute.go b/core/types/common/attribute.go index 4e2ddebbf..28f8b583f 100644 --- a/core/types/common/attribute.go +++ b/core/types/common/attribute.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/header.go b/core/types/common/header.go index ffcbe3466..b49f117ff 100644 --- a/core/types/common/header.go +++ b/core/types/common/header.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/input.go b/core/types/common/input.go index 7573c5067..839e6d01a 100644 --- a/core/types/common/input.go +++ b/core/types/common/input.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/outpoint.go b/core/types/common/outpoint.go index dd8c5765d..9523b8657 100644 --- a/core/types/common/outpoint.go +++ b/core/types/common/outpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/output.go b/core/types/common/output.go index b52477aa0..85b9c7119 100644 --- a/core/types/common/output.go +++ b/core/types/common/output.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/output_test.go b/core/types/common/output_test.go index cec27d34a..26dd2f659 100644 --- a/core/types/common/output_test.go +++ b/core/types/common/output_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/common/utxo.go b/core/types/common/utxo.go index b6711ef33..ee1b7a779 100644 --- a/core/types/common/utxo.go +++ b/core/types/common/utxo.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/dposblock.go b/core/types/dposblock.go index 89ef53f32..51ce1f30c 100644 --- a/core/types/dposblock.go +++ b/core/types/dposblock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/dposheader.go b/core/types/dposheader.go index 769db6eab..6fcbad256 100644 --- a/core/types/dposheader.go +++ b/core/types/dposheader.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/crosschain.go b/core/types/outputpayload/crosschain.go index 42fd587dd..96a08d276 100644 --- a/core/types/outputpayload/crosschain.go +++ b/core/types/outputpayload/crosschain.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/default.go b/core/types/outputpayload/default.go index 379d9abba..72a2b9e57 100644 --- a/core/types/outputpayload/default.go +++ b/core/types/outputpayload/default.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/mapping.go b/core/types/outputpayload/mapping.go index 9840f34bd..1737bea2b 100644 --- a/core/types/outputpayload/mapping.go +++ b/core/types/outputpayload/mapping.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/mapping_test.go b/core/types/outputpayload/mapping_test.go index e99708327..f5c83b784 100644 --- a/core/types/outputpayload/mapping_test.go +++ b/core/types/outputpayload/mapping_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/returnsidechaindeposit.go b/core/types/outputpayload/returnsidechaindeposit.go index 4de762ee4..6e5e82323 100644 --- a/core/types/outputpayload/returnsidechaindeposit.go +++ b/core/types/outputpayload/returnsidechaindeposit.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/stake.go b/core/types/outputpayload/stake.go index ce3d2351b..dc372c4a9 100644 --- a/core/types/outputpayload/stake.go +++ b/core/types/outputpayload/stake.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/vote.go b/core/types/outputpayload/vote.go index 7745ed7c2..21ddc3ada 100644 --- a/core/types/outputpayload/vote.go +++ b/core/types/outputpayload/vote.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/vote_test.go b/core/types/outputpayload/vote_test.go index 8b54671f8..1b40d32c0 100644 --- a/core/types/outputpayload/vote_test.go +++ b/core/types/outputpayload/vote_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/outputpayload/withdraw.go b/core/types/outputpayload/withdraw.go index 2b9bc1d5d..30b112cd1 100644 --- a/core/types/outputpayload/withdraw.go +++ b/core/types/outputpayload/withdraw.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/activateproducer.go b/core/types/payload/activateproducer.go index ee9f43a42..e082a9f97 100644 --- a/core/types/payload/activateproducer.go +++ b/core/types/payload/activateproducer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/asset.go b/core/types/payload/asset.go index 5c0e29fc4..a0518b431 100644 --- a/core/types/payload/asset.go +++ b/core/types/payload/asset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/coinbase.go b/core/types/payload/coinbase.go index 229145955..c6b769814 100644 --- a/core/types/payload/coinbase.go +++ b/core/types/payload/coinbase.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/confirm.go b/core/types/payload/confirm.go index 6ed4e5e98..9fe66c287 100644 --- a/core/types/payload/confirm.go +++ b/core/types/payload/confirm.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crassetsrectify.go b/core/types/payload/crassetsrectify.go index a69ecb148..01ce90614 100644 --- a/core/types/payload/crassetsrectify.go +++ b/core/types/payload/crassetsrectify.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crcappropriation.go b/core/types/payload/crcappropriation.go index bb1f5e76b..2f0b138cc 100644 --- a/core/types/payload/crcappropriation.go +++ b/core/types/payload/crcappropriation.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crcproposal.go b/core/types/payload/crcproposal.go index df0607d9f..6d537c2db 100644 --- a/core/types/payload/crcproposal.go +++ b/core/types/payload/crcproposal.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crcproposalrealwithdraw.go b/core/types/payload/crcproposalrealwithdraw.go index 028791bba..4f52dc5ee 100644 --- a/core/types/payload/crcproposalrealwithdraw.go +++ b/core/types/payload/crcproposalrealwithdraw.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crcproposalreview.go b/core/types/payload/crcproposalreview.go index 78352c78b..bef02a8fe 100644 --- a/core/types/payload/crcproposalreview.go +++ b/core/types/payload/crcproposalreview.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crcproposaltracking.go b/core/types/payload/crcproposaltracking.go index 4834b03de..bfcf7210c 100644 --- a/core/types/payload/crcproposaltracking.go +++ b/core/types/payload/crcproposaltracking.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crcproposalwithdraw.go b/core/types/payload/crcproposalwithdraw.go index f09d50cfc..6c290e111 100644 --- a/core/types/payload/crcproposalwithdraw.go +++ b/core/types/payload/crcproposalwithdraw.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/crinfo.go b/core/types/payload/crinfo.go index ef2263495..56a29e3e6 100644 --- a/core/types/payload/crinfo.go +++ b/core/types/payload/crinfo.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposillegalblocks.go b/core/types/payload/dposillegalblocks.go index bf3066320..5bec3d8a1 100644 --- a/core/types/payload/dposillegalblocks.go +++ b/core/types/payload/dposillegalblocks.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposillegaldata.go b/core/types/payload/dposillegaldata.go index 429b2178d..18f83dafd 100644 --- a/core/types/payload/dposillegaldata.go +++ b/core/types/payload/dposillegaldata.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposillegalproposals.go b/core/types/payload/dposillegalproposals.go index 2a7cbc250..fdc582558 100644 --- a/core/types/payload/dposillegalproposals.go +++ b/core/types/payload/dposillegalproposals.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposillegalvotes.go b/core/types/payload/dposillegalvotes.go index 28e66edae..69fa3c38c 100644 --- a/core/types/payload/dposillegalvotes.go +++ b/core/types/payload/dposillegalvotes.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposproposal.go b/core/types/payload/dposproposal.go index f058aa269..6e010917a 100644 --- a/core/types/payload/dposproposal.go +++ b/core/types/payload/dposproposal.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposproposalvote.go b/core/types/payload/dposproposalvote.go index a9f329ec1..b1e91706b 100644 --- a/core/types/payload/dposproposalvote.go +++ b/core/types/payload/dposproposalvote.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposv2claimreward.go b/core/types/payload/dposv2claimreward.go index 4c909d518..3ae92a064 100644 --- a/core/types/payload/dposv2claimreward.go +++ b/core/types/payload/dposv2claimreward.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/dposv2claimrewardrealwithdraw.go b/core/types/payload/dposv2claimrewardrealwithdraw.go index 2394a1529..cb9d81d58 100644 --- a/core/types/payload/dposv2claimrewardrealwithdraw.go +++ b/core/types/payload/dposv2claimrewardrealwithdraw.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/inactivearbitrators.go b/core/types/payload/inactivearbitrators.go index ca3fcf73d..91c043edc 100644 --- a/core/types/payload/inactivearbitrators.go +++ b/core/types/payload/inactivearbitrators.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/processproducer.go b/core/types/payload/processproducer.go index 40ecbc812..f41015ac5 100644 --- a/core/types/payload/processproducer.go +++ b/core/types/payload/processproducer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/producerinfo.go b/core/types/payload/producerinfo.go index 08d2a1453..d1c7707c4 100644 --- a/core/types/payload/producerinfo.go +++ b/core/types/payload/producerinfo.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/record.go b/core/types/payload/record.go index 0fca428a8..f14899a5d 100644 --- a/core/types/payload/record.go +++ b/core/types/payload/record.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/registerasset.go b/core/types/payload/registerasset.go index 77ff2aeb2..7c1a97e79 100644 --- a/core/types/payload/registerasset.go +++ b/core/types/payload/registerasset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/returnpledgecoin.go b/core/types/payload/returnpledgecoin.go index f9be54169..eaf9267fc 100644 --- a/core/types/payload/returnpledgecoin.go +++ b/core/types/payload/returnpledgecoin.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/returnsidechaindepositcoin.go b/core/types/payload/returnsidechaindepositcoin.go index 75683f08c..641abf3d1 100644 --- a/core/types/payload/returnsidechaindepositcoin.go +++ b/core/types/payload/returnsidechaindepositcoin.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/reverttodpos.go b/core/types/payload/reverttodpos.go index 068824544..edc9faa84 100644 --- a/core/types/payload/reverttodpos.go +++ b/core/types/payload/reverttodpos.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/reverttopow.go b/core/types/payload/reverttopow.go index 0b4b7dd1e..d712f9ff2 100644 --- a/core/types/payload/reverttopow.go +++ b/core/types/payload/reverttopow.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/sidechainillegaldata.go b/core/types/payload/sidechainillegaldata.go index 04a72b8be..e19660511 100644 --- a/core/types/payload/sidechainillegaldata.go +++ b/core/types/payload/sidechainillegaldata.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/sidechainpow.go b/core/types/payload/sidechainpow.go index 9ec35672a..9a19d0feb 100644 --- a/core/types/payload/sidechainpow.go +++ b/core/types/payload/sidechainpow.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/transferasset.go b/core/types/payload/transferasset.go index a37a6ceb9..1d53dfcdf 100644 --- a/core/types/payload/transferasset.go +++ b/core/types/payload/transferasset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/transfercrosschainasset.go b/core/types/payload/transfercrosschainasset.go index 6519ab093..a3e2179d9 100644 --- a/core/types/payload/transfercrosschainasset.go +++ b/core/types/payload/transfercrosschainasset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/unregistercr.go b/core/types/payload/unregistercr.go index 36c367efe..109e8dd52 100644 --- a/core/types/payload/unregistercr.go +++ b/core/types/payload/unregistercr.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/updateversion.go b/core/types/payload/updateversion.go index 09a8284a8..122998a41 100644 --- a/core/types/payload/updateversion.go +++ b/core/types/payload/updateversion.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/core/types/payload/withdrawfromsidechain.go b/core/types/payload/withdrawfromsidechain.go index daa2164f8..da8e8fe4d 100644 --- a/core/types/payload/withdrawfromsidechain.go +++ b/core/types/payload/withdrawfromsidechain.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/ICRRecord.go b/cr/state/ICRRecord.go index e103d5aa9..d0fad2dc9 100644 --- a/cr/state/ICRRecord.go +++ b/cr/state/ICRRecord.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/candidate.go b/cr/state/candidate.go index b6a058746..f273290eb 100644 --- a/cr/state/candidate.go +++ b/cr/state/candidate.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/checkpoint.go b/cr/state/checkpoint.go index b98e62a06..afaecd2d5 100644 --- a/cr/state/checkpoint.go +++ b/cr/state/checkpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/committee.go b/cr/state/committee.go index 038463168..0c6abf344 100644 --- a/cr/state/committee.go +++ b/cr/state/committee.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/committeeaction.go b/cr/state/committeeaction.go index 3497398fb..43a8c71b0 100644 --- a/cr/state/committeeaction.go +++ b/cr/state/committeeaction.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/keyframe.go b/cr/state/keyframe.go index 0df32a672..ad95f63d5 100644 --- a/cr/state/keyframe.go +++ b/cr/state/keyframe.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/log.go b/cr/state/log.go index c3139f585..4693b919a 100644 --- a/cr/state/log.go +++ b/cr/state/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/proposalmanager.go b/cr/state/proposalmanager.go index b4f5e6287..390b443f1 100644 --- a/cr/state/proposalmanager.go +++ b/cr/state/proposalmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/proposalmanager_test.go b/cr/state/proposalmanager_test.go index e9c466fe8..ce47dabe6 100644 --- a/cr/state/proposalmanager_test.go +++ b/cr/state/proposalmanager_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/cr/state/state.go b/cr/state/state.go index 399390c49..c0c1e183d 100644 --- a/cr/state/state.go +++ b/cr/state/state.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/aes.go b/crypto/aes.go index ea1cd339d..a54d1ed11 100644 --- a/crypto/aes.go +++ b/crypto/aes.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/common.go b/crypto/common.go index 099485226..ddc2dd6fc 100644 --- a/crypto/common.go +++ b/crypto/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/crypto.go b/crypto/crypto.go index fb2849088..c0ca4e8d5 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 915e6d52d..dafd712c4 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/encode.go b/crypto/encode.go index bd55da603..10b9c42ae 100644 --- a/crypto/encode.go +++ b/crypto/encode.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/merkletree.go b/crypto/merkletree.go index 8db53bdad..7cea71f00 100644 --- a/crypto/merkletree.go +++ b/crypto/merkletree.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/crypto/schnorr.go b/crypto/schnorr.go index daee608b1..6042bc72e 100644 --- a/crypto/schnorr.go +++ b/crypto/schnorr.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/doc.go b/database/doc.go index d8a6ed284..48eb7e0d6 100644 --- a/database/doc.go +++ b/database/doc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/driver.go b/database/driver.go index ac5b7b619..e055eff1d 100644 --- a/database/driver.go +++ b/database/driver.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/driver_test.go b/database/driver_test.go index 9d92e2848..266ff090e 100644 --- a/database/driver_test.go +++ b/database/driver_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/error.go b/database/error.go index 781b050d7..4714dbb09 100644 --- a/database/error.go +++ b/database/error.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/error_test.go b/database/error_test.go index 4f6359ccd..e9313a2ea 100644 --- a/database/error_test.go +++ b/database/error_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/export_test.go b/database/export_test.go index d750faa9c..590cbe05d 100644 --- a/database/export_test.go +++ b/database/export_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/blockio.go b/database/ffldb/blockio.go index d127e2448..dc0416e7a 100644 --- a/database/ffldb/blockio.go +++ b/database/ffldb/blockio.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/db.go b/database/ffldb/db.go index fa696868e..a71e49f1a 100644 --- a/database/ffldb/db.go +++ b/database/ffldb/db.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/dbcache.go b/database/ffldb/dbcache.go index 0adaac486..fbbfaada4 100644 --- a/database/ffldb/dbcache.go +++ b/database/ffldb/dbcache.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/doc.go b/database/ffldb/doc.go index d1a0c53d7..5a7adbfdb 100644 --- a/database/ffldb/doc.go +++ b/database/ffldb/doc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/driver.go b/database/ffldb/driver.go index 6c63ada84..fa0bfbabf 100644 --- a/database/ffldb/driver.go +++ b/database/ffldb/driver.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/ldbtreapiter.go b/database/ffldb/ldbtreapiter.go index 60c4dc848..4545d1a96 100644 --- a/database/ffldb/ldbtreapiter.go +++ b/database/ffldb/ldbtreapiter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/ffldb/reconcile.go b/database/ffldb/reconcile.go index bcec3753c..c3678e5f3 100644 --- a/database/ffldb/reconcile.go +++ b/database/ffldb/reconcile.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/interface.go b/database/interface.go index fa7c05a00..c0056c946 100644 --- a/database/interface.go +++ b/database/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/common.go b/database/internal/treap/common.go index 618946fa4..3d9b3e90a 100644 --- a/database/internal/treap/common.go +++ b/database/internal/treap/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/common_test.go b/database/internal/treap/common_test.go index 09184439b..382f2491a 100644 --- a/database/internal/treap/common_test.go +++ b/database/internal/treap/common_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/doc.go b/database/internal/treap/doc.go index 91d7b0b45..a3498d834 100644 --- a/database/internal/treap/doc.go +++ b/database/internal/treap/doc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/immutable.go b/database/internal/treap/immutable.go index 824ff98d3..568fde788 100644 --- a/database/internal/treap/immutable.go +++ b/database/internal/treap/immutable.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/immutable_test.go b/database/internal/treap/immutable_test.go index da46c782e..44d848cb7 100644 --- a/database/internal/treap/immutable_test.go +++ b/database/internal/treap/immutable_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/mutable.go b/database/internal/treap/mutable.go index 874e5e277..8e1cf7c33 100644 --- a/database/internal/treap/mutable.go +++ b/database/internal/treap/mutable.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/mutable_test.go b/database/internal/treap/mutable_test.go index 2edbefad4..425db6d6a 100644 --- a/database/internal/treap/mutable_test.go +++ b/database/internal/treap/mutable_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/treapiter.go b/database/internal/treap/treapiter.go index 275d878ca..4bac56d64 100644 --- a/database/internal/treap/treapiter.go +++ b/database/internal/treap/treapiter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/database/internal/treap/treapiter_test.go b/database/internal/treap/treapiter_test.go index 18be30c35..c68565a46 100644 --- a/database/internal/treap/treapiter_test.go +++ b/database/internal/treap/treapiter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/account/account.go b/dpos/account/account.go index b49a87867..55356d55c 100644 --- a/dpos/account/account.go +++ b/dpos/account/account.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/arbitrator.go b/dpos/arbitrator.go index 0c2851c1c..798abf7de 100644 --- a/dpos/arbitrator.go +++ b/dpos/arbitrator.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/log/eventlogs.go b/dpos/log/eventlogs.go index 36606138f..6a5649484 100644 --- a/dpos/log/eventlogs.go +++ b/dpos/log/eventlogs.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/log/eventmonitor.go b/dpos/log/eventmonitor.go index aafad8f6f..e53ebb981 100644 --- a/dpos/log/eventmonitor.go +++ b/dpos/log/eventmonitor.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/log/log.go b/dpos/log/log.go index 4cb227c69..de2b2d7cf 100644 --- a/dpos/log/log.go +++ b/dpos/log/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/consensus.go b/dpos/manager/consensus.go index 3b4f35cd1..0c3f1facd 100644 --- a/dpos/manager/consensus.go +++ b/dpos/manager/consensus.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/consensusblockcache.go b/dpos/manager/consensusblockcache.go index 5fb120bb2..acdcaa406 100644 --- a/dpos/manager/consensusblockcache.go +++ b/dpos/manager/consensusblockcache.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/dposhandlerswitch.go b/dpos/manager/dposhandlerswitch.go index 9efffc920..672dc7ac2 100644 --- a/dpos/manager/dposhandlerswitch.go +++ b/dpos/manager/dposhandlerswitch.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/dposmanager.go b/dpos/manager/dposmanager.go index 01c845702..7d82f01b0 100644 --- a/dpos/manager/dposmanager.go +++ b/dpos/manager/dposmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/dposnormalhandler.go b/dpos/manager/dposnormalhandler.go index 09ec5baaf..5acf62e3a 100644 --- a/dpos/manager/dposnormalhandler.go +++ b/dpos/manager/dposnormalhandler.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/dposondutyhandler.go b/dpos/manager/dposondutyhandler.go index 32c097bbb..6b876cc66 100644 --- a/dpos/manager/dposondutyhandler.go +++ b/dpos/manager/dposondutyhandler.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/eventanalyzer.go b/dpos/manager/eventanalyzer.go index 59847dec7..d46d402cb 100644 --- a/dpos/manager/eventanalyzer.go +++ b/dpos/manager/eventanalyzer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/evidencecache.go b/dpos/manager/evidencecache.go index c87352aea..43a2b1e92 100644 --- a/dpos/manager/evidencecache.go +++ b/dpos/manager/evidencecache.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/illegalbehaviormonitor.go b/dpos/manager/illegalbehaviormonitor.go index 877cd9992..1e831b712 100644 --- a/dpos/manager/illegalbehaviormonitor.go +++ b/dpos/manager/illegalbehaviormonitor.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/proposaldispatcher.go b/dpos/manager/proposaldispatcher.go index 1150acf39..9f035f043 100644 --- a/dpos/manager/proposaldispatcher.go +++ b/dpos/manager/proposaldispatcher.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/view.go b/dpos/manager/view.go index 307ccf72f..d21c9194c 100644 --- a/dpos/manager/view.go +++ b/dpos/manager/view.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/manager/viewchangescountdown.go b/dpos/manager/viewchangescountdown.go index 02fbc2315..eea9c580d 100644 --- a/dpos/manager/viewchangescountdown.go +++ b/dpos/manager/viewchangescountdown.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/network.go b/dpos/network.go index ff66f2986..662e9c903 100644 --- a/dpos/network.go +++ b/dpos/network.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/addrmgr/addrmanager.go b/dpos/p2p/addrmgr/addrmanager.go index 3a6d4b175..38ad3a955 100644 --- a/dpos/p2p/addrmgr/addrmanager.go +++ b/dpos/p2p/addrmgr/addrmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/addrmgr/addrmanager_test.go b/dpos/p2p/addrmgr/addrmanager_test.go index f00f88dff..0fbe20463 100644 --- a/dpos/p2p/addrmgr/addrmanager_test.go +++ b/dpos/p2p/addrmgr/addrmanager_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/addrmgr/log.go b/dpos/p2p/addrmgr/log.go index 19aa25b03..8cd9a5fa8 100644 --- a/dpos/p2p/addrmgr/log.go +++ b/dpos/p2p/addrmgr/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/config.go b/dpos/p2p/config.go index 862750967..77120f73a 100644 --- a/dpos/p2p/config.go +++ b/dpos/p2p/config.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/connmgr/connmanager.go b/dpos/p2p/connmgr/connmanager.go index eb69e2035..7aea424aa 100644 --- a/dpos/p2p/connmgr/connmanager.go +++ b/dpos/p2p/connmgr/connmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/connmgr/log.go b/dpos/p2p/connmgr/log.go index 4f5e4c48b..38b753212 100644 --- a/dpos/p2p/connmgr/log.go +++ b/dpos/p2p/connmgr/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/hub/conn.go b/dpos/p2p/hub/conn.go index 50121179d..45a5ff274 100644 --- a/dpos/p2p/hub/conn.go +++ b/dpos/p2p/hub/conn.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/hub/hub.go b/dpos/p2p/hub/hub.go index 149ce7042..a9d35c5a3 100644 --- a/dpos/p2p/hub/hub.go +++ b/dpos/p2p/hub/hub.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/hub/hub_test.go b/dpos/p2p/hub/hub_test.go index 74ee99bd1..df289cf51 100644 --- a/dpos/p2p/hub/hub_test.go +++ b/dpos/p2p/hub/hub_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/hub/log.go b/dpos/p2p/hub/log.go index 6c2c5ceb5..0b22051a1 100644 --- a/dpos/p2p/hub/log.go +++ b/dpos/p2p/hub/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/interface.go b/dpos/p2p/interface.go index fa8ffd336..4971933ad 100644 --- a/dpos/p2p/interface.go +++ b/dpos/p2p/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/log.go b/dpos/p2p/log.go index 256126125..467ecfdb8 100644 --- a/dpos/p2p/log.go +++ b/dpos/p2p/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/addr.go b/dpos/p2p/msg/addr.go index 89774947c..2afdfd584 100644 --- a/dpos/p2p/msg/addr.go +++ b/dpos/p2p/msg/addr.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/commands.go b/dpos/p2p/msg/commands.go index 290c22e18..b02e4e773 100644 --- a/dpos/p2p/msg/commands.go +++ b/dpos/p2p/msg/commands.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/consensusstatus.go b/dpos/p2p/msg/consensusstatus.go index e84cf9aef..fb38d4f3f 100644 --- a/dpos/p2p/msg/consensusstatus.go +++ b/dpos/p2p/msg/consensusstatus.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/getblock.go b/dpos/p2p/msg/getblock.go index 52ba736d6..260113b6e 100644 --- a/dpos/p2p/msg/getblock.go +++ b/dpos/p2p/msg/getblock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/getblocks.go b/dpos/p2p/msg/getblocks.go index d081a9130..9701670ad 100644 --- a/dpos/p2p/msg/getblocks.go +++ b/dpos/p2p/msg/getblocks.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/illegalproposals.go b/dpos/p2p/msg/illegalproposals.go index d2097a4c2..7f28b93ad 100644 --- a/dpos/p2p/msg/illegalproposals.go +++ b/dpos/p2p/msg/illegalproposals.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/illegalvotes.go b/dpos/p2p/msg/illegalvotes.go index 975781d93..0e74e538a 100644 --- a/dpos/p2p/msg/illegalvotes.go +++ b/dpos/p2p/msg/illegalvotes.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/inventory.go b/dpos/p2p/msg/inventory.go index 06eb82fe2..c851f7de2 100644 --- a/dpos/p2p/msg/inventory.go +++ b/dpos/p2p/msg/inventory.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/ping.go b/dpos/p2p/msg/ping.go index 5f0a9c26b..6a61fd137 100644 --- a/dpos/p2p/msg/ping.go +++ b/dpos/p2p/msg/ping.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/pong.go b/dpos/p2p/msg/pong.go index 5a46bdbeb..d97015bbb 100644 --- a/dpos/p2p/msg/pong.go +++ b/dpos/p2p/msg/pong.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/proposal.go b/dpos/p2p/msg/proposal.go index c2a609516..b595aa484 100644 --- a/dpos/p2p/msg/proposal.go +++ b/dpos/p2p/msg/proposal.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/reject.go b/dpos/p2p/msg/reject.go index ce500a497..4e80fc35a 100644 --- a/dpos/p2p/msg/reject.go +++ b/dpos/p2p/msg/reject.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/requestconsensus.go b/dpos/p2p/msg/requestconsensus.go index a456cc64b..c99878169 100644 --- a/dpos/p2p/msg/requestconsensus.go +++ b/dpos/p2p/msg/requestconsensus.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/requestproposal.go b/dpos/p2p/msg/requestproposal.go index ed7a44540..945b57f99 100644 --- a/dpos/p2p/msg/requestproposal.go +++ b/dpos/p2p/msg/requestproposal.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/resetview.go b/dpos/p2p/msg/resetview.go index 1cf1680d5..41a141081 100644 --- a/dpos/p2p/msg/resetview.go +++ b/dpos/p2p/msg/resetview.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/responseblocks.go b/dpos/p2p/msg/responseblocks.go index a441753a6..c2385fc83 100644 --- a/dpos/p2p/msg/responseblocks.go +++ b/dpos/p2p/msg/responseblocks.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/responseconsensus.go b/dpos/p2p/msg/responseconsensus.go index bba1c73e6..9c6f73bdb 100644 --- a/dpos/p2p/msg/responseconsensus.go +++ b/dpos/p2p/msg/responseconsensus.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/responseinactivearbitrators.go b/dpos/p2p/msg/responseinactivearbitrators.go index 33a38ddca..238903ddb 100644 --- a/dpos/p2p/msg/responseinactivearbitrators.go +++ b/dpos/p2p/msg/responseinactivearbitrators.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/responsereverttodpos.go b/dpos/p2p/msg/responsereverttodpos.go index 850598e89..1a9e384c4 100644 --- a/dpos/p2p/msg/responsereverttodpos.go +++ b/dpos/p2p/msg/responsereverttodpos.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/sidechainillegaldata.go b/dpos/p2p/msg/sidechainillegaldata.go index 14fcfa5b3..89b841a20 100644 --- a/dpos/p2p/msg/sidechainillegaldata.go +++ b/dpos/p2p/msg/sidechainillegaldata.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/verack.go b/dpos/p2p/msg/verack.go index fc26eb9b5..c6a034c01 100644 --- a/dpos/p2p/msg/verack.go +++ b/dpos/p2p/msg/verack.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/version.go b/dpos/p2p/msg/version.go index 9d053c29b..79d127951 100644 --- a/dpos/p2p/msg/version.go +++ b/dpos/p2p/msg/version.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/msg/vote.go b/dpos/p2p/msg/vote.go index 4b15b3401..7c6d4a98c 100644 --- a/dpos/p2p/msg/vote.go +++ b/dpos/p2p/msg/vote.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/notifier.go b/dpos/p2p/notifier.go index 89684465b..93c0b4c64 100644 --- a/dpos/p2p/notifier.go +++ b/dpos/p2p/notifier.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/notifier_test.go b/dpos/p2p/notifier_test.go index 8704b603e..d927200fc 100644 --- a/dpos/p2p/notifier_test.go +++ b/dpos/p2p/notifier_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/server.go b/dpos/p2p/server.go index 57361933e..67c6f6c6e 100644 --- a/dpos/p2p/server.go +++ b/dpos/p2p/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/p2p/server_test.go b/dpos/p2p/server_test.go index b0ce4f994..2916f6e88 100644 --- a/dpos/p2p/server_test.go +++ b/dpos/p2p/server_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/arbitermember.go b/dpos/state/arbitermember.go index 89aac1f6c..187915810 100644 --- a/dpos/state/arbitermember.go +++ b/dpos/state/arbitermember.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/arbitermember_test.go b/dpos/state/arbitermember_test.go index 233c27e28..a237ea4ea 100644 --- a/dpos/state/arbitermember_test.go +++ b/dpos/state/arbitermember_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/arbitrators.go b/dpos/state/arbitrators.go index a7253caf1..937bb1a45 100644 --- a/dpos/state/arbitrators.go +++ b/dpos/state/arbitrators.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/arbitratorsmock.go b/dpos/state/arbitratorsmock.go index 8b2758b54..446a1c91d 100644 --- a/dpos/state/arbitratorsmock.go +++ b/dpos/state/arbitratorsmock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/checkpoint.go b/dpos/state/checkpoint.go index 045ee150a..079863f2b 100644 --- a/dpos/state/checkpoint.go +++ b/dpos/state/checkpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/crarbiter_test.go b/dpos/state/crarbiter_test.go index fcee674c2..386576a94 100644 --- a/dpos/state/crarbiter_test.go +++ b/dpos/state/crarbiter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/crcarbiter.go b/dpos/state/crcarbiter.go index cd61d2684..077537b66 100644 --- a/dpos/state/crcarbiter.go +++ b/dpos/state/crcarbiter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/degradation.go b/dpos/state/degradation.go index 2eacbe1c7..4edf0bd97 100644 --- a/dpos/state/degradation.go +++ b/dpos/state/degradation.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/dposarbiter.go b/dpos/state/dposarbiter.go index c066e95bd..1b38f3a02 100644 --- a/dpos/state/dposarbiter.go +++ b/dpos/state/dposarbiter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/dposarbiter_test.go b/dpos/state/dposarbiter_test.go index 2ac501a79..ebc9e6d43 100644 --- a/dpos/state/dposarbiter_test.go +++ b/dpos/state/dposarbiter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/heightversion.go b/dpos/state/heightversion.go index 8f3e409ca..583f36210 100644 --- a/dpos/state/heightversion.go +++ b/dpos/state/heightversion.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/interface.go b/dpos/state/interface.go index 1b0f9c628..81df2884f 100644 --- a/dpos/state/interface.go +++ b/dpos/state/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/keyframe.go b/dpos/state/keyframe.go index 7d70186dd..5e866a0f6 100644 --- a/dpos/state/keyframe.go +++ b/dpos/state/keyframe.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/log.go b/dpos/state/log.go index dddf714b4..514102dbd 100644 --- a/dpos/state/log.go +++ b/dpos/state/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/originarbiter.go b/dpos/state/originarbiter.go index c0483cf48..c3f20a133 100644 --- a/dpos/state/originarbiter.go +++ b/dpos/state/originarbiter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/originarbiter_test.go b/dpos/state/originarbiter_test.go index c60b4b693..0576c0715 100644 --- a/dpos/state/originarbiter_test.go +++ b/dpos/state/originarbiter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/dpos/state/state.go b/dpos/state/state.go index db8efde46..cc78da7b6 100644 --- a/dpos/state/state.go +++ b/dpos/state/state.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/dns/dns.go b/elanet/dns/dns.go index 949f25ace..8e6d2141e 100644 --- a/elanet/dns/dns.go +++ b/elanet/dns/dns.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/dns/dns_test.go b/elanet/dns/dns_test.go index e45a98362..d82ea4ac5 100644 --- a/elanet/dns/dns_test.go +++ b/elanet/dns/dns_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/dns/log.go b/elanet/dns/log.go index 622627fff..159dd21d5 100644 --- a/elanet/dns/log.go +++ b/elanet/dns/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/dns/main/main.go b/elanet/dns/main/main.go index 9426f9898..efc841a15 100644 --- a/elanet/dns/main/main.go +++ b/elanet/dns/main/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/customidfilter/customidfilter.go b/elanet/filter/customidfilter/customidfilter.go index 072f6028d..ec12a094b 100644 --- a/elanet/filter/customidfilter/customidfilter.go +++ b/elanet/filter/customidfilter/customidfilter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/filter.go b/elanet/filter/filter.go index 813c9d917..5cb6746bf 100644 --- a/elanet/filter/filter.go +++ b/elanet/filter/filter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/merkleblock.go b/elanet/filter/merkleblock.go index 4d7d464c3..f842f8e6b 100644 --- a/elanet/filter/merkleblock.go +++ b/elanet/filter/merkleblock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/nextturndposfilter/nextturndposfilter.go b/elanet/filter/nextturndposfilter/nextturndposfilter.go index 477fa2e5e..5cd8f1fb8 100644 --- a/elanet/filter/nextturndposfilter/nextturndposfilter.go +++ b/elanet/filter/nextturndposfilter/nextturndposfilter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/returnsidechaindepositcoinfilter/returnsidechaindepositecoinfilter.go b/elanet/filter/returnsidechaindepositcoinfilter/returnsidechaindepositecoinfilter.go index 6183f3442..8e5694555 100644 --- a/elanet/filter/returnsidechaindepositcoinfilter/returnsidechaindepositecoinfilter.go +++ b/elanet/filter/returnsidechaindepositcoinfilter/returnsidechaindepositecoinfilter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/sidefilter/sidefilter.go b/elanet/filter/sidefilter/sidefilter.go index aa05ecada..3c295ad7d 100644 --- a/elanet/filter/sidefilter/sidefilter.go +++ b/elanet/filter/sidefilter/sidefilter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/filter/upgradefilter/upgradefilter.go b/elanet/filter/upgradefilter/upgradefilter.go index aee6389da..810686110 100644 --- a/elanet/filter/upgradefilter/upgradefilter.go +++ b/elanet/filter/upgradefilter/upgradefilter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/interface.go b/elanet/interface.go index 114a68270..3b728df3a 100644 --- a/elanet/interface.go +++ b/elanet/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/log.go b/elanet/log.go index 8501fe194..95f575de7 100644 --- a/elanet/log.go +++ b/elanet/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/netsync/interface.go b/elanet/netsync/interface.go index 0745e8c73..5b4d70ee0 100644 --- a/elanet/netsync/interface.go +++ b/elanet/netsync/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/netsync/log.go b/elanet/netsync/log.go index 5a4f14c74..8d6ccaadf 100644 --- a/elanet/netsync/log.go +++ b/elanet/netsync/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/netsync/manager.go b/elanet/netsync/manager.go index d84b6b18f..d68c7111a 100644 --- a/elanet/netsync/manager.go +++ b/elanet/netsync/manager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/pact/protocol.go b/elanet/pact/protocol.go index 0b58c20b9..c4991a583 100644 --- a/elanet/pact/protocol.go +++ b/elanet/pact/protocol.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/peer/log.go b/elanet/peer/log.go index 648ad9416..667fa3a67 100644 --- a/elanet/peer/log.go +++ b/elanet/peer/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/peer/mruinvmap.go b/elanet/peer/mruinvmap.go index 51f246b0f..45880c9cf 100644 --- a/elanet/peer/mruinvmap.go +++ b/elanet/peer/mruinvmap.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/peer/mruinvmap_test.go b/elanet/peer/mruinvmap_test.go index 6ad8aa594..e2a1f1090 100644 --- a/elanet/peer/mruinvmap_test.go +++ b/elanet/peer/mruinvmap_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/peer/peer.go b/elanet/peer/peer.go index d7a19fb5b..ab8af32d1 100644 --- a/elanet/peer/peer.go +++ b/elanet/peer/peer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/routes/log.go b/elanet/routes/log.go index b4fccda57..0f4b80ae2 100644 --- a/elanet/routes/log.go +++ b/elanet/routes/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/routes/routes.go b/elanet/routes/routes.go index 5d3881c83..b6abd73e2 100644 --- a/elanet/routes/routes.go +++ b/elanet/routes/routes.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/routes/routes_test.go b/elanet/routes/routes_test.go index f392ed78e..451ec6c5d 100644 --- a/elanet/routes/routes_test.go +++ b/elanet/routes/routes_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/elanet/server.go b/elanet/server.go index 418e48400..a3c6af568 100644 --- a/elanet/server.go +++ b/elanet/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/elaerror.go b/errors/elaerror.go index 1aa27a0d4..bc584d207 100644 --- a/errors/elaerror.go +++ b/errors/elaerror.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/errcode.go b/errors/errcode.go index 64115f809..dbf844049 100644 --- a/errors/errcode.go +++ b/errors/errcode.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/errcode_test.go b/errors/errcode_test.go index 0796f9c4b..be16e8ec8 100644 --- a/errors/errcode_test.go +++ b/errors/errcode_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/errmap.go b/errors/errmap.go index d6efba983..18c850de2 100644 --- a/errors/errmap.go +++ b/errors/errmap.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/errmap_test.go b/errors/errmap_test.go index 64ed794a6..f7bc4d785 100644 --- a/errors/errmap_test.go +++ b/errors/errmap_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/jsonformat.go b/errors/jsonformat.go index f007fb022..f503d998d 100644 --- a/errors/jsonformat.go +++ b/errors/jsonformat.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/errors/jsonformat_test.go b/errors/jsonformat_test.go index 468f19221..8274930c7 100644 --- a/errors/jsonformat_test.go +++ b/errors/jsonformat_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/events/events.go b/events/events.go index 9a35ab2db..bcc66a131 100644 --- a/events/events.go +++ b/events/events.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/events/events_test.go b/events/events_test.go index ab2c644f9..b9ae0286d 100644 --- a/events/events_test.go +++ b/events/events_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/log.go b/log.go index 4e5276eb2..4c22f6f98 100644 --- a/log.go +++ b/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/main.go b/main.go index e66cab125..c5ab91611 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/blockevidence.go b/mempool/blockevidence.go index 308dec16f..bd0b32a18 100644 --- a/mempool/blockevidence.go +++ b/mempool/blockevidence.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/blockpool.go b/mempool/blockpool.go index e75092645..c467df12c 100644 --- a/mempool/blockpool.go +++ b/mempool/blockpool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/conflictfunc.go b/mempool/conflictfunc.go index 6a32e20d5..12209db2c 100644 --- a/mempool/conflictfunc.go +++ b/mempool/conflictfunc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/conflictmanager.go b/mempool/conflictmanager.go index f77a7a168..b3dae85b6 100644 --- a/mempool/conflictmanager.go +++ b/mempool/conflictmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/conflictmanager_test.go b/mempool/conflictmanager_test.go index 3512d67c6..b92b0bdfd 100644 --- a/mempool/conflictmanager_test.go +++ b/mempool/conflictmanager_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/conflictslot.go b/mempool/conflictslot.go index 173f0d620..a1500b414 100644 --- a/mempool/conflictslot.go +++ b/mempool/conflictslot.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/conflictslot_test.go b/mempool/conflictslot_test.go index 609afde27..ed1686bf3 100644 --- a/mempool/conflictslot_test.go +++ b/mempool/conflictslot_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/txfeeorderedlist.go b/mempool/txfeeorderedlist.go index c43c334ce..f71a137e4 100644 --- a/mempool/txfeeorderedlist.go +++ b/mempool/txfeeorderedlist.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/txfeeorderedlist_bench_test.go b/mempool/txfeeorderedlist_bench_test.go index 6c6c32c44..d173d5a44 100644 --- a/mempool/txfeeorderedlist_bench_test.go +++ b/mempool/txfeeorderedlist_bench_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/txfeeorderedlist_test.go b/mempool/txfeeorderedlist_test.go index e32150a7b..329f74e5b 100644 --- a/mempool/txfeeorderedlist_test.go +++ b/mempool/txfeeorderedlist_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/txpool.go b/mempool/txpool.go index 4848a1456..4ea33c83d 100644 --- a/mempool/txpool.go +++ b/mempool/txpool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/txpool_test.go b/mempool/txpool_test.go index 4ab7e1d37..2e5366019 100644 --- a/mempool/txpool_test.go +++ b/mempool/txpool_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/mempool/txpoolcheckpoint.go b/mempool/txpoolcheckpoint.go index db9af5f7e..1ed2fd15b 100644 --- a/mempool/txpoolcheckpoint.go +++ b/mempool/txpoolcheckpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/addrmanager.go b/p2p/addrmgr/addrmanager.go index bc5668916..d7b7d7ca4 100644 --- a/p2p/addrmgr/addrmanager.go +++ b/p2p/addrmgr/addrmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/addrmanager_test.go b/p2p/addrmgr/addrmanager_test.go index 1f79684a1..e9ae962b4 100644 --- a/p2p/addrmgr/addrmanager_test.go +++ b/p2p/addrmgr/addrmanager_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/internal_test.go b/p2p/addrmgr/internal_test.go index ad0e21e4d..0d2f27a8f 100644 --- a/p2p/addrmgr/internal_test.go +++ b/p2p/addrmgr/internal_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/knownaddress.go b/p2p/addrmgr/knownaddress.go index 6db2ca44d..9d4e978c8 100644 --- a/p2p/addrmgr/knownaddress.go +++ b/p2p/addrmgr/knownaddress.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/knownaddress_test.go b/p2p/addrmgr/knownaddress_test.go index 9f6da6a75..7eba443a1 100644 --- a/p2p/addrmgr/knownaddress_test.go +++ b/p2p/addrmgr/knownaddress_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/log.go b/p2p/addrmgr/log.go index 19aa25b03..8cd9a5fa8 100644 --- a/p2p/addrmgr/log.go +++ b/p2p/addrmgr/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/network.go b/p2p/addrmgr/network.go index a3556a7b3..8f661ef7f 100644 --- a/p2p/addrmgr/network.go +++ b/p2p/addrmgr/network.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/addrmgr/network_test.go b/p2p/addrmgr/network_test.go index 05ac6be14..1344fe301 100644 --- a/p2p/addrmgr/network_test.go +++ b/p2p/addrmgr/network_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/connmgr/connmanager.go b/p2p/connmgr/connmanager.go index df919e630..ed3573e0d 100644 --- a/p2p/connmgr/connmanager.go +++ b/p2p/connmgr/connmanager.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/connmgr/connmanager_test.go b/p2p/connmgr/connmanager_test.go index 2b297ef4d..23e899639 100644 --- a/p2p/connmgr/connmanager_test.go +++ b/p2p/connmgr/connmanager_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/connmgr/dynamicbanscore.go b/p2p/connmgr/dynamicbanscore.go index 8242ad94b..f98379fa9 100644 --- a/p2p/connmgr/dynamicbanscore.go +++ b/p2p/connmgr/dynamicbanscore.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/connmgr/dynamicbanscore_test.go b/p2p/connmgr/dynamicbanscore_test.go index f1993d128..4f4ec9957 100644 --- a/p2p/connmgr/dynamicbanscore_test.go +++ b/p2p/connmgr/dynamicbanscore_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/connmgr/log.go b/p2p/connmgr/log.go index 4f5e4c48b..38b753212 100644 --- a/p2p/connmgr/log.go +++ b/p2p/connmgr/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/connmgr/tor.go b/p2p/connmgr/tor.go index 90394bf27..18dc079f4 100644 --- a/p2p/connmgr/tor.go +++ b/p2p/connmgr/tor.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/header.go b/p2p/header.go index c2c33ef48..a05d69210 100644 --- a/p2p/header.go +++ b/p2p/header.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/message.go b/p2p/message.go index 536b9b781..09a7b7826 100644 --- a/p2p/message.go +++ b/p2p/message.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/addr.go b/p2p/msg/addr.go index 33058da67..9340fe1f9 100644 --- a/p2p/msg/addr.go +++ b/p2p/msg/addr.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/block.go b/p2p/msg/block.go index a55dcabde..ac3d76925 100644 --- a/p2p/msg/block.go +++ b/p2p/msg/block.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/daddr.go b/p2p/msg/daddr.go index b270da53f..682f5abcf 100644 --- a/p2p/msg/daddr.go +++ b/p2p/msg/daddr.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/empty.go b/p2p/msg/empty.go index 93779906c..7e54e16ab 100644 --- a/p2p/msg/empty.go +++ b/p2p/msg/empty.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/filteradd.go b/p2p/msg/filteradd.go index f5b2eef9f..d671a881c 100644 --- a/p2p/msg/filteradd.go +++ b/p2p/msg/filteradd.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/filterclear.go b/p2p/msg/filterclear.go index 8861bc175..77245126c 100644 --- a/p2p/msg/filterclear.go +++ b/p2p/msg/filterclear.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/filterload.go b/p2p/msg/filterload.go index 0f658f3d3..55f9475de 100644 --- a/p2p/msg/filterload.go +++ b/p2p/msg/filterload.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/getaddr.go b/p2p/msg/getaddr.go index 3d90b6450..140a0f46a 100644 --- a/p2p/msg/getaddr.go +++ b/p2p/msg/getaddr.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/getblocks.go b/p2p/msg/getblocks.go index 047036882..9f56696b8 100644 --- a/p2p/msg/getblocks.go +++ b/p2p/msg/getblocks.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/getdata.go b/p2p/msg/getdata.go index bd0f493c2..40ae65050 100644 --- a/p2p/msg/getdata.go +++ b/p2p/msg/getdata.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/inv.go b/p2p/msg/inv.go index 29b1dda66..5093ede1c 100644 --- a/p2p/msg/inv.go +++ b/p2p/msg/inv.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/invvect.go b/p2p/msg/invvect.go index 8fa51b3f2..8aa0ddcb9 100644 --- a/p2p/msg/invvect.go +++ b/p2p/msg/invvect.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/mempool.go b/p2p/msg/mempool.go index 41c84a6af..43ab4a01e 100644 --- a/p2p/msg/mempool.go +++ b/p2p/msg/mempool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/merkleblock.go b/p2p/msg/merkleblock.go index bf15b629d..2544814d6 100644 --- a/p2p/msg/merkleblock.go +++ b/p2p/msg/merkleblock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/notfound.go b/p2p/msg/notfound.go index 665978f11..ef65595ce 100644 --- a/p2p/msg/notfound.go +++ b/p2p/msg/notfound.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/ping.go b/p2p/msg/ping.go index 5f0a9c26b..6a61fd137 100644 --- a/p2p/msg/ping.go +++ b/p2p/msg/ping.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/pong.go b/p2p/msg/pong.go index 5a46bdbeb..d97015bbb 100644 --- a/p2p/msg/pong.go +++ b/p2p/msg/pong.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/reject.go b/p2p/msg/reject.go index 49653fef9..8196de58c 100644 --- a/p2p/msg/reject.go +++ b/p2p/msg/reject.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/tx.go b/p2p/msg/tx.go index 2c742a70f..bfb498807 100644 --- a/p2p/msg/tx.go +++ b/p2p/msg/tx.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/txfilterload.go b/p2p/msg/txfilterload.go index 02dd8b934..4f26e00c9 100644 --- a/p2p/msg/txfilterload.go +++ b/p2p/msg/txfilterload.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/verack.go b/p2p/msg/verack.go index 609be790c..6f9ec507a 100644 --- a/p2p/msg/verack.go +++ b/p2p/msg/verack.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/msg/version.go b/p2p/msg/version.go index 5381d2b47..0b697efcc 100644 --- a/p2p/msg/version.go +++ b/p2p/msg/version.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/nafilter.go b/p2p/nafilter.go index 5954e53b5..dcc504e72 100644 --- a/p2p/nafilter.go +++ b/p2p/nafilter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/netaddress.go b/p2p/netaddress.go index 1edbc1e29..d95a6f2a7 100644 --- a/p2p/netaddress.go +++ b/p2p/netaddress.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/peer/log.go b/p2p/peer/log.go index bfd77e593..30ab2873d 100644 --- a/p2p/peer/log.go +++ b/p2p/peer/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/peer/peer.go b/p2p/peer/peer.go index cccd2dd18..1f8d76bb8 100644 --- a/p2p/peer/peer.go +++ b/p2p/peer/peer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/config.go b/p2p/server/config.go index f92ae1497..bdb477f95 100644 --- a/p2p/server/config.go +++ b/p2p/server/config.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/interface.go b/p2p/server/interface.go index cdc0f005f..b7aefdeeb 100644 --- a/p2p/server/interface.go +++ b/p2p/server/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/log.go b/p2p/server/log.go index aeaf15fe6..06652b02d 100644 --- a/p2p/server/log.go +++ b/p2p/server/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/mrunoncemap.go b/p2p/server/mrunoncemap.go index 69e026831..247542202 100644 --- a/p2p/server/mrunoncemap.go +++ b/p2p/server/mrunoncemap.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/mrunoncemap_test.go b/p2p/server/mrunoncemap_test.go index c5793d3b0..e65810cc9 100644 --- a/p2p/server/mrunoncemap_test.go +++ b/p2p/server/mrunoncemap_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/seed.go b/p2p/server/seed.go index f0975adda..eeb21f3f9 100644 --- a/p2p/server/seed.go +++ b/p2p/server/seed.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/p2p/server/server.go b/p2p/server/server.go index 1f6c8dde5..9b1a74b8c 100644 --- a/p2p/server/server.go +++ b/p2p/server/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/pow/revertlistener.go b/pow/revertlistener.go index 77b015db3..315dbece0 100644 --- a/pow/revertlistener.go +++ b/pow/revertlistener.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/pow/service.go b/pow/service.go index b3eb7e1ec..6c743d492 100644 --- a/pow/service.go +++ b/pow/service.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/pow/service_test.go b/pow/service_test.go index ed3f3f961..de7be7b1f 100644 --- a/pow/service_test.go +++ b/pow/service_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/common.go b/servers/common.go index 13059cffc..042e4d3b9 100644 --- a/servers/common.go +++ b/servers/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/errors/errcode.go b/servers/errors/errcode.go index 39a8f4996..074c729ac 100644 --- a/servers/errors/errcode.go +++ b/servers/errors/errcode.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/errors/errcode_test.go b/servers/errors/errcode_test.go index 198a966e3..067799962 100644 --- a/servers/errors/errcode_test.go +++ b/servers/errors/errcode_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httpjsonrpc/server.go b/servers/httpjsonrpc/server.go index 48b2de8ec..3a9a9b472 100644 --- a/servers/httpjsonrpc/server.go +++ b/servers/httpjsonrpc/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httpnodeinfo/server.go b/servers/httpnodeinfo/server.go index 7712b12a6..49018da32 100644 --- a/servers/httpnodeinfo/server.go +++ b/servers/httpnodeinfo/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httpnodeinfo/template.go b/servers/httpnodeinfo/template.go index 3ec014556..6d6426b8c 100644 --- a/servers/httpnodeinfo/template.go +++ b/servers/httpnodeinfo/template.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httprestful/router.go b/servers/httprestful/router.go index 0b30231cb..2e62818f7 100644 --- a/servers/httprestful/router.go +++ b/servers/httprestful/router.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httprestful/server.go b/servers/httprestful/server.go index 344e9bcfd..1e039efd9 100644 --- a/servers/httprestful/server.go +++ b/servers/httprestful/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httpwebsocket/server.go b/servers/httpwebsocket/server.go index 0b9a25968..9ca1030d8 100644 --- a/servers/httpwebsocket/server.go +++ b/servers/httpwebsocket/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/httpwebsocket/session.go b/servers/httpwebsocket/session.go index 50d0a3c30..46d5edff1 100644 --- a/servers/httpwebsocket/session.go +++ b/servers/httpwebsocket/session.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/interfaces.go b/servers/interfaces.go index 6753691c2..e3b8bd982 100644 --- a/servers/interfaces.go +++ b/servers/interfaces.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/servers/params.go b/servers/params.go index d9b500ab4..2b32a85f8 100644 --- a/servers/params.go +++ b/servers/params.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/arbitrators_test.go b/test/unit/arbitrators_test.go index ebd5d46fc..50c43d7d9 100644 --- a/test/unit/arbitrators_test.go +++ b/test/unit/arbitrators_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/arbitratorsrollback_test.go b/test/unit/arbitratorsrollback_test.go index 6c562af27..b5373ddc2 100644 --- a/test/unit/arbitratorsrollback_test.go +++ b/test/unit/arbitratorsrollback_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/blockvalidator_test.go b/test/unit/blockvalidator_test.go index 022297389..99d06c87e 100644 --- a/test/unit/blockvalidator_test.go +++ b/test/unit/blockvalidator_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/candidate_test.go b/test/unit/candidate_test.go index 4e4fdc79e..39cda0f84 100644 --- a/test/unit/candidate_test.go +++ b/test/unit/candidate_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/chainstore_test.go b/test/unit/chainstore_test.go index 34d651095..ffdd0f7a1 100644 --- a/test/unit/chainstore_test.go +++ b/test/unit/chainstore_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/committee_test.go b/test/unit/committee_test.go index c0aa0ae8b..2cd2e7340 100644 --- a/test/unit/committee_test.go +++ b/test/unit/committee_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/committeerollback_test.go b/test/unit/committeerollback_test.go index 0c51eea9b..126c31c93 100644 --- a/test/unit/committeerollback_test.go +++ b/test/unit/committeerollback_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/crkeyframe_test.go b/test/unit/crkeyframe_test.go index d3eead239..46a9ae12c 100644 --- a/test/unit/crkeyframe_test.go +++ b/test/unit/crkeyframe_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/dposkeyframe_test.go b/test/unit/dposkeyframe_test.go index e3c54404c..e7f4211a2 100644 --- a/test/unit/dposkeyframe_test.go +++ b/test/unit/dposkeyframe_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/dposstate_test.go b/test/unit/dposstate_test.go index b22b0ac45..c51dac909 100644 --- a/test/unit/dposstate_test.go +++ b/test/unit/dposstate_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/heightversion_test.go b/test/unit/heightversion_test.go index 008c048ed..0fd46b840 100644 --- a/test/unit/heightversion_test.go +++ b/test/unit/heightversion_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/returndepositindex_test.go b/test/unit/returndepositindex_test.go index fac762135..411152629 100644 --- a/test/unit/returndepositindex_test.go +++ b/test/unit/returndepositindex_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/reward_test.go b/test/unit/reward_test.go index 3053bbb1c..5e12b308c 100644 --- a/test/unit/reward_test.go +++ b/test/unit/reward_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/server_test.go b/test/unit/server_test.go index 66a955841..22cdfd207 100644 --- a/test/unit/server_test.go +++ b/test/unit/server_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/state_test.go b/test/unit/state_test.go index 214fb3ff5..23e5e187f 100644 --- a/test/unit/state_test.go +++ b/test/unit/state_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/transaction_test.go b/test/unit/transaction_test.go index 4378ff61c..608b6de13 100644 --- a/test/unit/transaction_test.go +++ b/test/unit/transaction_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/txvalidator_specailtx_test.go b/test/unit/txvalidator_specailtx_test.go index 3c47f80e1..939ecfbf1 100644 --- a/test/unit/txvalidator_specailtx_test.go +++ b/test/unit/txvalidator_specailtx_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/txvalidator_test.go b/test/unit/txvalidator_test.go index e22261473..4a99b2e51 100644 --- a/test/unit/txvalidator_test.go +++ b/test/unit/txvalidator_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/unspentindex_test.go b/test/unit/unspentindex_test.go index 9fc9549cd..afa0daa37 100644 --- a/test/unit/unspentindex_test.go +++ b/test/unit/unspentindex_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/utxocache_test.go b/test/unit/utxocache_test.go index 83bc975ab..82e872110 100644 --- a/test/unit/utxocache_test.go +++ b/test/unit/utxocache_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/utxoindex_test.go b/test/unit/utxoindex_test.go index e759cbd80..0f4e1748e 100644 --- a/test/unit/utxoindex_test.go +++ b/test/unit/utxoindex_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/test/unit/validation_test.go b/test/unit/validation_test.go index 201bece46..6407f7f8a 100644 --- a/test/unit/validation_test.go +++ b/test/unit/validation_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/common.go b/utils/common.go index 42608275b..63406e89e 100644 --- a/utils/common.go +++ b/utils/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/elalog/filewriter.go b/utils/elalog/filewriter.go index c3ba79202..c95aaac82 100644 --- a/utils/elalog/filewriter.go +++ b/utils/elalog/filewriter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/elalog/interface.go b/utils/elalog/interface.go index 5bbfd0327..02a7e4451 100644 --- a/utils/elalog/interface.go +++ b/utils/elalog/interface.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/elalog/log.go b/utils/elalog/log.go index 2a26ee4f2..4ef6930a6 100644 --- a/utils/elalog/log.go +++ b/utils/elalog/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/gpath/gpath.go b/utils/gpath/gpath.go index dc80fb03f..b507a397d 100644 --- a/utils/gpath/gpath.go +++ b/utils/gpath/gpath.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/gpath/gpath_test.go b/utils/gpath/gpath_test.go index 51b2d3bc2..611b58b8e 100644 --- a/utils/gpath/gpath_test.go +++ b/utils/gpath/gpath_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/history.go b/utils/history.go index 99c9c75ad..a73cd0f53 100644 --- a/utils/history.go +++ b/utils/history.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/history_test.go b/utils/history_test.go index 2cce9ad18..d50b7cac4 100644 --- a/utils/history_test.go +++ b/utils/history_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/error.go b/utils/http/error.go index b47f1844a..35c8b1224 100644 --- a/utils/http/error.go +++ b/utils/http/error.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/jsonrpc/server.go b/utils/http/jsonrpc/server.go index 6833827c9..cdad6b6ce 100644 --- a/utils/http/jsonrpc/server.go +++ b/utils/http/jsonrpc/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/jsonrpc/server_test.go b/utils/http/jsonrpc/server_test.go index c26eb78ba..53a4cc2a7 100644 --- a/utils/http/jsonrpc/server_test.go +++ b/utils/http/jsonrpc/server_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/jsonrpc/util.go b/utils/http/jsonrpc/util.go index ddd98b8b0..8fee2042c 100644 --- a/utils/http/jsonrpc/util.go +++ b/utils/http/jsonrpc/util.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/params.go b/utils/http/params.go index ffad865cc..bed56748f 100644 --- a/utils/http/params.go +++ b/utils/http/params.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/restful/route.go b/utils/http/restful/route.go index def47f6b4..7adbeb796 100644 --- a/utils/http/restful/route.go +++ b/utils/http/restful/route.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/restful/server.go b/utils/http/restful/server.go index 54d3546bc..a38f463fd 100644 --- a/utils/http/restful/server.go +++ b/utils/http/restful/server.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/http/restful/server_test.go b/utils/http/restful/server_test.go index c9f467e61..13582af1e 100644 --- a/utils/http/restful/server_test.go +++ b/utils/http/restful/server_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/signal/interrupt.go b/utils/signal/interrupt.go index 7dd5a4709..18ff239eb 100644 --- a/utils/signal/interrupt.go +++ b/utils/signal/interrupt.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/utils/test/test.go b/utils/test/test.go index 287ee06c8..c263ed031 100644 --- a/utils/test/test.go +++ b/utils/test/test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/coin.go b/wallet/coin.go index 30b8bbb43..562540d99 100644 --- a/wallet/coin.go +++ b/wallet/coin.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/coin_test.go b/wallet/coin_test.go index 03f51bfb8..5d73208ad 100644 --- a/wallet/coin_test.go +++ b/wallet/coin_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/coincheckpoint.go b/wallet/coincheckpoint.go index 2d91bf0ad..72d295bcf 100644 --- a/wallet/coincheckpoint.go +++ b/wallet/coincheckpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/coincheckpoint_test.go b/wallet/coincheckpoint_test.go index 8586f5fc1..a486e9b7d 100644 --- a/wallet/coincheckpoint_test.go +++ b/wallet/coincheckpoint_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/common.go b/wallet/common.go index a08d0b3b3..3db42ff3b 100644 --- a/wallet/common.go +++ b/wallet/common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/ownedcoins.go b/wallet/ownedcoins.go index 7e823e0c7..da0d04f91 100644 --- a/wallet/ownedcoins.go +++ b/wallet/ownedcoins.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/ownedcoins_test.go b/wallet/ownedcoins_test.go index 87024705b..5f6c9b973 100644 --- a/wallet/ownedcoins_test.go +++ b/wallet/ownedcoins_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/wallet.go b/wallet/wallet.go index a6be77be3..69f3f61a6 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index 81d35c0ed..7b9c1a251 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Elastos Foundation +// Copyright (c) 2017-2022 The Elastos Foundation // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. // From 8ead35eb0594d4eeb51e0d91dc33396b843e33dc Mon Sep 17 00:00:00 2001 From: jiangzehua <1092431698@qq.com> Date: Thu, 7 Jul 2022 16:51:32 +0800 Subject: [PATCH 3/4] feat(dpos2.0): use VM to check standard or multi signature transaction --- blockchain/txvalidator.go | 2 +- blockchain/validation.go | 95 ++++++++++++-------------- core/transaction/transactionchecker.go | 10 +-- test/unit/validation_test.go | 22 +++--- 4 files changed, 56 insertions(+), 73 deletions(-) diff --git a/blockchain/txvalidator.go b/blockchain/txvalidator.go index cb708d565..f13ba53c1 100644 --- a/blockchain/txvalidator.go +++ b/blockchain/txvalidator.go @@ -707,7 +707,7 @@ func checkTransactionSignature(tx interfaces.Transaction, references map[*common // sort the program hashes of owner and programs of the transaction common.SortProgramHashByCodeHash(programHashes) SortPrograms(tx.Programs()) - return RunPrograms(buf.Bytes(), programHashes, tx.Programs()) + return RunPrograms(tx, buf.Bytes(), programHashes, tx.Programs()) } func CheckAmountPrecise(amount common.Fixed64, precision byte) bool { diff --git a/blockchain/validation.go b/blockchain/validation.go index c6e8cb312..96c6a8e8d 100644 --- a/blockchain/validation.go +++ b/blockchain/validation.go @@ -25,7 +25,7 @@ var GetDataContainer = func(programHash *common.Uint168, tx interfaces.Transacti return tx } -func RunProgramsVM(tx interfaces.Transaction, hashes []common.Uint168, programs []*Program) error { +func RunPrograms(tx interfaces.Transaction, data []byte, hashes []common.Uint168, programs []*Program) error { if tx == nil { return errors.New("invalid data content nil transaction") } @@ -34,46 +34,16 @@ func RunProgramsVM(tx interfaces.Transaction, hashes []common.Uint168, programs } for i := 0; i < len(programs); i++ { - codeHash := common.ToCodeHash(programs[i].Code) + program := programs[i] + programHash := hashes[i] - if !hashes[i].ToCodeHash().IsEqual(*codeHash) { - return errors.New("data hash is different from corresponding program code") - } - //execute program on VM - se := vm.NewExecutionEngine(GetDataContainer(&hashes[i], tx), - new(vm.CryptoECDsa), vm.MAXSTEPS, nil, nil) - se.LoadScript(programs[i].Code, false) - se.LoadScript(programs[i].Parameter, true) - se.Execute() - - if se.GetState() != vm.HALT { - return errors.New("[VM] Finish State not equal to HALT") - } - - if se.GetEvaluationStack().Count() != 1 { - return errors.New("[VM] Execute Engine Stack Count Error") - } - - success := se.GetExecuteResult() - if !success { - return errors.New("[VM] Check Sig FALSE") - } - } - - return nil -} - -func RunPrograms(data []byte, programHashes []common.Uint168, programs []*Program) error { - if len(programHashes) != len(programs) { - return errors.New("the number of data hashes is different with number of programs") - } + codeHash := common.ToCodeHash(program.Code) - for i, program := range programs { - programHash := programHashes[i] prefixType := contract.GetPrefixType(programHash) - // TODO: this implementation will be deprecated - if prefixType == contract.PrefixCrossChain { + + switch prefixType { + case contract.PrefixCrossChain: if contract.IsSchnorr(program.Code) { if ok, err := checkSchnorrSignatures(*program, common.Sha256D(data[:])); !ok { return errors.New("check schnorr signature failed:" + err.Error()) @@ -84,32 +54,51 @@ func RunPrograms(data []byte, programHashes []common.Uint168, programs []*Progra } } continue - } - codeHash := common.ToCodeHash(program.Code) - ownerHash := programHash.ToCodeHash() - - if !ownerHash.IsEqual(*codeHash) { - return errors.New("the data hashes is different with corresponding program code") - } + case contract.PrefixStandard, contract.PrefixDeposit: + if !hashes[i].ToCodeHash().IsEqual(*codeHash) { + return errors.New("data hash is different from corresponding program code") + } - if prefixType == contract.PrefixStandard || prefixType == contract.PrefixDeposit { if contract.IsSchnorr(program.Code) { if ok, err := checkSchnorrSignatures(*program, common.Sha256D(data[:])); !ok { return errors.New("check schnorr signature failed:" + err.Error()) } - } else { - if err := CheckStandardSignature(*program, data); err != nil { - return err - } + continue } - } else if prefixType == contract.PrefixMultiSig { - if err := CheckMultiSigSignatures(*program, data); err != nil { - return err + + case contract.PrefixMultiSig: + if !hashes[i].ToCodeHash().IsEqual(*codeHash) { + return errors.New("data hash is different from corresponding program code") } - } else { + //if err := CheckMultiSigSignatures(*program, data); err != nil { + // return err + //} + + default: return errors.New("unknown signature type") } + + // check standard or multi signature + // execute program on VM + se := vm.NewExecutionEngine(GetDataContainer(&hashes[i], tx), + new(vm.CryptoECDsa), vm.MAXSTEPS, nil, nil) + se.LoadScript(programs[i].Code, false) + se.LoadScript(programs[i].Parameter, true) + se.Execute() + + if se.GetState() != vm.HALT { + return errors.New("[VM] Finish State not equal to HALT") + } + + if se.GetEvaluationStack().Count() != 1 { + return errors.New("[VM] Execute Engine Stack Count Error") + } + + success := se.GetExecuteResult() + if !success { + return errors.New("[VM] Check Sig FALSE") + } } return nil diff --git a/core/transaction/transactionchecker.go b/core/transaction/transactionchecker.go index 31b03f95d..e115fcf3e 100644 --- a/core/transaction/transactionchecker.go +++ b/core/transaction/transactionchecker.go @@ -599,14 +599,8 @@ func checkTransactionSignature(tx interfaces.Transaction, references map[*common // sort the program hashes of owner and programs of the transaction common.SortProgramHashByCodeHash(programHashes) blockchain.SortPrograms(tx.Programs()) - return blockchain.RunPrograms(buf.Bytes(), programHashes, tx.Programs()) - - // todo complete me - // - //switch tx.TxType() { - //case common2.TxType - //} - //return blockchain.RunProgramsVM(tx, programHashes, tx.Programs()) + + return blockchain.RunPrograms(tx, buf.Bytes(), programHashes, tx.Programs()) } func checkTransactionDepositOutputs(bc *blockchain.BlockChain, txn interfaces.Transaction) error { diff --git a/test/unit/validation_test.go b/test/unit/validation_test.go index 6407f7f8a..7de8232d0 100644 --- a/test/unit/validation_test.go +++ b/test/unit/validation_test.go @@ -330,7 +330,7 @@ func TestSchnorrRunProgramsOrigin(t *testing.T) { programHash := c.ToProgramHash() hashes = append(hashes, *programHash) programs = append(programs, &program.Program{Code: redeemscript, Parameter: sig[:]}) - err = blockchain.RunPrograms(data, hashes[0:1], programs) + err = blockchain.RunPrograms(tx, data, hashes[0:1], programs) assert.NoError(t, err, "[RunProgram] passed with 1 checksig program") }) @@ -566,7 +566,7 @@ func TestSchnorrRunPrograms(t *testing.T) { init(schnorrAccountNum) for index := 0; index < schnorrAccountNum; index++ { - err = blockchain.RunPrograms(data, hashes[index:index+1], programs[index:index+1]) + err = blockchain.RunPrograms(tx, data, hashes[index:index+1], programs[index:index+1]) if err != nil { fmt.Printf("AggregateSignatures index %d fail err %s \n", index, err.Error()) } else { @@ -618,7 +618,7 @@ func TestRunPrograms(t *testing.T) { break } } - err = blockchain.RunPrograms(data, hashes[index:index+1], programs[index:index+1]) + err = blockchain.RunPrograms(tx, data, hashes[index:index+1], programs[index:index+1]) assert.NoError(t, err, "[RunProgram] passed with 1 checksig program") // 1 loop multisig @@ -629,25 +629,25 @@ func TestRunPrograms(t *testing.T) { break } } - err = blockchain.RunPrograms(data, hashes[index:index+1], programs[index:index+1]) + err = blockchain.RunPrograms(tx, data, hashes[index:index+1], programs[index:index+1]) assert.NoError(t, err, "[RunProgram] passed with 1 multisig program") // multiple programs - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.NoError(t, err, "[RunProgram] passed with multiple programs") // hashes count not equal to programs count init() removeIndex := math.Intn(num) hashes = append(hashes[:removeIndex], hashes[removeIndex+1:]...) - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.Error(t, err, "[RunProgram] passed with unmathed hashes") assert.Equal(t, "the number of data hashes is different with number of programs", err.Error()) // With no programs init() programs = []*program.Program{} - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.Error(t, err, "[RunProgram] passed with no programs") assert.Equal(t, "the number of data hashes is different with number of programs", err.Error()) @@ -656,7 +656,7 @@ func TestRunPrograms(t *testing.T) { for i := 0; i < num; i++ { rand.Read(hashes[math.Intn(num)][:]) } - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.Error(t, err, "[RunProgram] passed with unmathed hashes") assert.Equal(t, "the data hashes is different with corresponding program code", err.Error()) @@ -664,7 +664,7 @@ func TestRunPrograms(t *testing.T) { init() common.SortProgramHashByCodeHash(hashes) sort.Sort(sort.Reverse(blockchain.ByHash(programs))) - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.Error(t, err, "[RunProgram] passed with disordered hashes") assert.Equal(t, "the data hashes is different with corresponding program code", err.Error()) @@ -673,7 +673,7 @@ func TestRunPrograms(t *testing.T) { for i := 0; i < num; i++ { programs[math.Intn(num)].Code = nil } - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.Error(t, err, "[RunProgram] passed with random no code") assert.Equal(t, "the data hashes is different with corresponding program code", err.Error()) @@ -683,7 +683,7 @@ func TestRunPrograms(t *testing.T) { index := math.Intn(num) programs[index].Parameter = nil } - err = blockchain.RunPrograms(data, hashes, programs) + err = blockchain.RunPrograms(tx, data, hashes, programs) assert.Error(t, err, "[RunProgram] passed with random no parameter") } From d12bbdb44cef412c15773ee4924f29dca899bb91 Mon Sep 17 00:00:00 2001 From: jiangzehua <1092431698@qq.com> Date: Wed, 27 Jul 2022 10:44:11 +0800 Subject: [PATCH 4/4] feat(dpos2.0): weaken the validation of signature --- vm/func_crypto.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vm/func_crypto.go b/vm/func_crypto.go index b6c154448..15c825cd6 100755 --- a/vm/func_crypto.go +++ b/vm/func_crypto.go @@ -93,11 +93,13 @@ func opCheckMultiSig(e *ExecutionEngine) (VMState, error) { } if index != -1 { pubkeys = append(pubkeys[:index], pubkeys[index+1:]...) - } else { - fSuccess = false - break } + //else { + // fSuccess = false + // break + //} } + if verified < m { fSuccess = false }