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