diff --git a/codec/reflectcodec/struct_fielder.go b/codec/reflectcodec/struct_fielder.go index f3f6bfc0f167..c0df6e1b1a26 100644 --- a/codec/reflectcodec/struct_fielder.go +++ b/codec/reflectcodec/struct_fielder.go @@ -1,3 +1,13 @@ +// Copyright (C) 2023-2024, Chain4Travel AG. All rights reserved. +// +// This file is a derived work, based on ava-labs code whose +// original notices appear below. +// +// It is distributed under the same license conditions as the +// original code from which it is derived. +// +// Much love to the original authors for their work. +// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/config/keys.go b/config/keys.go index a79ad3467f82..02674b1f76fd 100644 --- a/config/keys.go +++ b/config/keys.go @@ -1,3 +1,13 @@ +// Copyright (C) 2023, Chain4Travel AG. All rights reserved. +// +// This file is a derived work, based on ava-labs code whose +// original notices appear below. +// +// It is distributed under the same license conditions as the +// original code from which it is derived. +// +// Much love to the original authors for their work. +// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/main/main.go b/main/main.go index fae16fd2f710..5d85530177dd 100644 --- a/main/main.go +++ b/main/main.go @@ -1,13 +1,3 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. -// -// This file is a derived work, based on ava-labs code whose -// original notices appear below. -// -// It is distributed under the same license conditions as the -// original code from which it is derived. -// -// Much love to the original authors for their work. -// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. @@ -19,6 +9,7 @@ import ( "os" "github.com/spf13/pflag" + "golang.org/x/term" "github.com/ava-labs/avalanchego/app" diff --git a/node/config.go b/node/config.go index 3f3c377cf207..d1cfa31324cd 100644 --- a/node/config.go +++ b/node/config.go @@ -1,3 +1,13 @@ +// Copyright (C) 2023-2024, Chain4Travel AG. All rights reserved. +// +// This file is a derived work, based on ava-labs code whose +// original notices appear below. +// +// It is distributed under the same license conditions as the +// original code from which it is derived. +// +// Much love to the original authors for their work. +// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/tests/e2e/banff/suites.go b/tests/e2e/banff/suites.go index 38ff66c1ab92..ee07f50c49c8 100644 --- a/tests/e2e/banff/suites.go +++ b/tests/e2e/banff/suites.go @@ -1,13 +1,3 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. -// -// This file is a derived work, based on ava-labs code whose -// original notices appear below. -// -// It is distributed under the same license conditions as the -// original code from which it is derived. -// -// Much love to the original authors for their work. -// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/tests/e2e/e2e.go b/tests/e2e/e2e.go index 17e96da44a28..1a3be366b625 100644 --- a/tests/e2e/e2e.go +++ b/tests/e2e/e2e.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. +// Copyright (C) 2022-2024, Chain4Travel AG. All rights reserved. // // This file is a derived work, based on ava-labs code whose // original notices appear below. diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 919e0b81599d..ef6112938fbe 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. +// Copyright (C) 2022-2024, Chain4Travel AG. All rights reserved. // // This file is a derived work, based on ava-labs code whose // original notices appear below. diff --git a/tests/e2e/p/permissionless_subnets.go b/tests/e2e/p/permissionless_subnets.go index 45d31cbe59cb..bcd6ac640322 100644 --- a/tests/e2e/p/permissionless_subnets.go +++ b/tests/e2e/p/permissionless_subnets.go @@ -1,13 +1,3 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. -// -// This file is a derived work, based on ava-labs code whose -// original notices appear below. -// -// It is distributed under the same license conditions as the -// original code from which it is derived. -// -// Much love to the original authors for their work. -// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/tests/e2e/p/workflow.go b/tests/e2e/p/workflow.go index 1d1ef74605d9..957124a425cb 100644 --- a/tests/e2e/p/workflow.go +++ b/tests/e2e/p/workflow.go @@ -1,13 +1,3 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. -// -// This file is a derived work, based on ava-labs code whose -// original notices appear below. -// -// It is distributed under the same license conditions as the -// original code from which it is derived. -// -// Much love to the original authors for their work. -// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index 1e4bd3eac9e1..138f43e54a2d 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. +// Copyright (C) 2022-2024, Chain4Travel AG. All rights reserved. // // This file is a derived work, based on ava-labs code whose // original notices appear below. diff --git a/version/compatibility_test.go b/version/compatibility_test.go index 014f28adf87c..e82a24de7451 100644 --- a/version/compatibility_test.go +++ b/version/compatibility_test.go @@ -1,3 +1,13 @@ +// Copyright (C) 2024, Chain4Travel AG. All rights reserved. +// +// This file is a derived work, based on ava-labs code whose +// original notices appear below. +// +// It is distributed under the same license conditions as the +// original code from which it is derived. +// +// Much love to the original authors for their work. +// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/version/constants_test.go b/version/constants_test.go index a90c1b8d0e0e..5e409dd91767 100644 --- a/version/constants_test.go +++ b/version/constants_test.go @@ -11,8 +11,5 @@ import ( func TestCurrentRPCChainVMCompatible(t *testing.T) { compatibleVersions := RPCChainVMProtocolCompatibility[RPCChainVMProtocol] - for _, version := range compatibleVersions { - _ = version.String() - } require.Contains(t, compatibleVersions, Current) } diff --git a/vms/platformvm/addrstate/address_state.go b/vms/platformvm/addrstate/camino_address_state.go similarity index 100% rename from vms/platformvm/addrstate/address_state.go rename to vms/platformvm/addrstate/camino_address_state.go diff --git a/vms/platformvm/api/static_service.go b/vms/platformvm/api/static_service.go index 8c67d266d98a..5d1a04bb6be7 100644 --- a/vms/platformvm/api/static_service.go +++ b/vms/platformvm/api/static_service.go @@ -210,7 +210,6 @@ func bech32ToID(addrStr string) (ids.ShortID, error) { // BuildGenesis build the genesis state of the Platform Chain (and thereby the Avalanche network.) func (*StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error { // Specify the UTXOs on the Platform chain that exist at genesis. - var vdrs txheap.TimedHeap if args.Camino != nil && args.Camino.LockModeBondDeposit { return buildCaminoGenesis(args, reply) } @@ -257,7 +256,7 @@ func (*StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, repl } // Specify the validators that are validating the primary network at genesis. - vdrs = txheap.NewByEndTime() + vdrs := txheap.NewByEndTime() for _, vdr := range args.Validators { weight := uint64(0) stake := make([]*avax.TransferableOutput, len(vdr.Staked)) diff --git a/vms/platformvm/service_test.go b/vms/platformvm/service_test.go index f95172b622b5..cdba33faef99 100644 --- a/vms/platformvm/service_test.go +++ b/vms/platformvm/service_test.go @@ -11,8 +11,6 @@ // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:generate mockgen -source cache_internal_state.go -destination mock_cache_internal_state.go -package platformvm -aux_files github.com/chain4travel/caminogo/vms/platformvm=cache_versioned_state.go,github.com/chain4travel/caminogo/vms/platformvm=cache_validator_state.go - package platformvm import ( diff --git a/vms/platformvm/txs/base_tx_test.go b/vms/platformvm/txs/base_tx_test.go index 6e5b5ad75b7b..d0a463932f5a 100644 --- a/vms/platformvm/txs/base_tx_test.go +++ b/vms/platformvm/txs/base_tx_test.go @@ -1,3 +1,13 @@ +// Copyright (C) 2024, Chain4Travel AG. All rights reserved. +// +// This file is a derived work, based on ava-labs code whose +// original notices appear below. +// +// It is distributed under the same license conditions as the +// original code from which it is derived. +// +// Much love to the original authors for their work. +// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/vms/platformvm/txs/executor/proposal_tx_executor.go b/vms/platformvm/txs/executor/proposal_tx_executor.go index a572d3ff71f6..258e8314249d 100644 --- a/vms/platformvm/txs/executor/proposal_tx_executor.go +++ b/vms/platformvm/txs/executor/proposal_tx_executor.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022-2023, Chain4Travel AG. All rights reserved. +// Copyright (C) 2022-2024, Chain4Travel AG. All rights reserved. // // This file is a derived work, based on ava-labs code whose // original notices appear below. diff --git a/vms/platformvm/txs/executor/state_changes.go b/vms/platformvm/txs/executor/state_changes.go index c6237c1987dc..eb4797feb2ed 100644 --- a/vms/platformvm/txs/executor/state_changes.go +++ b/vms/platformvm/txs/executor/state_changes.go @@ -148,9 +148,6 @@ func AdvanceTimeTo( if stakerToRemove.StartTime.After(newChainTime) { break } - if stakerToRemove.EndTime.Equal(stakerToRemove.StartTime) { - continue - } stakerToAdd := *stakerToRemove stakerToAdd.NextTime = stakerToRemove.EndTime diff --git a/vms/types/blob_data.go b/vms/types/blob_data.go index 1cbf7743eca9..ed8647a9d791 100644 --- a/vms/types/blob_data.go +++ b/vms/types/blob_data.go @@ -1,3 +1,13 @@ +// Copyright (C) 2022-2024, Chain4Travel AG. All rights reserved. +// +// This file is a derived work, based on ava-labs code whose +// original notices appear below. +// +// It is distributed under the same license conditions as the +// original code from which it is derived. +// +// Much love to the original authors for their work. +// ********************************************************** // Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms.