|
5 | 5 | "github.com/ProtoconNet/mitum-timestamp/operation/timestamp" |
6 | 6 | "github.com/ProtoconNet/mitum-timestamp/state" |
7 | 7 | "github.com/ProtoconNet/mitum-timestamp/types" |
8 | | - "github.com/ProtoconNet/mitum2/launch" |
9 | 8 | "github.com/ProtoconNet/mitum2/util/encoder" |
10 | 9 | "github.com/pkg/errors" |
11 | 10 | ) |
@@ -33,25 +32,11 @@ var AddedSupportedHinters = []encoder.DecodeDetail{ |
33 | 32 | } |
34 | 33 |
|
35 | 34 | func init() { |
36 | | - defaultLen := len(launch.Hinters) |
37 | | - currencyExtendedLen := defaultLen + len(currencycmds.AddedHinters) |
38 | | - allExtendedLen := currencyExtendedLen + len(AddedHinters) |
| 35 | + Hinters = append(Hinters, currencycmds.Hinters...) |
| 36 | + Hinters = append(Hinters, AddedHinters...) |
39 | 37 |
|
40 | | - Hinters = make([]encoder.DecodeDetail, allExtendedLen) |
41 | | - copy(Hinters, launch.Hinters) |
42 | | - copy(Hinters[defaultLen:currencyExtendedLen], currencycmds.AddedHinters) |
43 | | - copy(Hinters[currencyExtendedLen:], AddedHinters) |
44 | | - |
45 | | - defaultSupportedLen := len(launch.SupportedProposalOperationFactHinters) |
46 | | - currencySupportedExtendedLen := defaultSupportedLen + len(currencycmds.AddedSupportedHinters) |
47 | | - allSupportedExtendedLen := currencySupportedExtendedLen + len(AddedSupportedHinters) |
48 | | - |
49 | | - SupportedProposalOperationFactHinters = make( |
50 | | - []encoder.DecodeDetail, |
51 | | - allSupportedExtendedLen) |
52 | | - copy(SupportedProposalOperationFactHinters, launch.SupportedProposalOperationFactHinters) |
53 | | - copy(SupportedProposalOperationFactHinters[defaultSupportedLen:currencySupportedExtendedLen], currencycmds.AddedSupportedHinters) |
54 | | - copy(SupportedProposalOperationFactHinters[currencySupportedExtendedLen:], AddedSupportedHinters) |
| 38 | + SupportedProposalOperationFactHinters = append(SupportedProposalOperationFactHinters, currencycmds.SupportedProposalOperationFactHinters...) |
| 39 | + SupportedProposalOperationFactHinters = append(SupportedProposalOperationFactHinters, AddedSupportedHinters...) |
55 | 40 | } |
56 | 41 |
|
57 | 42 | func LoadHinters(encs *encoder.Encoders) error { |
|
0 commit comments