@@ -50,6 +50,12 @@ namespace libbitcoin {
5050namespace explorer {
5151namespace commands {
5252
53+ /* *
54+ * Various localizable strings.
55+ */
56+ #define BX_BASE58CHECK_ENCODE_OBSOLETE \
57+ " This command is obsolete. Use combination of base58-encode and checked-decode instead."
58+
5359/* *
5460 * Class to implement the base58check-encode command.
5561 */
@@ -97,15 +103,23 @@ class BCX_API base58check_encode
97103 return " Convert a Base16 value to Base58Check." ;
98104 }
99105
106+ /* *
107+ * Declare whether the command has been obsoleted.
108+ * @return True if the command is obsolete
109+ */
110+ virtual bool obsolete ()
111+ {
112+ return true ;
113+ }
114+
100115 /* *
101116 * Load program argument definitions.
102117 * A value of -1 indicates that the number of instances is unlimited.
103118 * @return The loaded program argument definitions.
104119 */
105120 virtual system::arguments_metadata& load_arguments ()
106121 {
107- return get_argument_metadata ()
108- .add (" BASE16" , 1 );
122+ return get_argument_metadata ();
109123 }
110124
111125 /* *
@@ -116,8 +130,6 @@ class BCX_API base58check_encode
116130 virtual void load_fallbacks (std::istream& input,
117131 po::variables_map& variables)
118132 {
119- const auto raw = requires_raw_input ();
120- load_input (get_base16_argument (), " BASE16" , variables, input, raw);
121133 }
122134
123135 /* *
@@ -139,16 +151,6 @@ class BCX_API base58check_encode
139151 BX_CONFIG_VARIABLE " ,c" ,
140152 value<boost::filesystem::path>(),
141153 " The path to the configuration settings file."
142- )
143- (
144- " version,v" ,
145- value<explorer::config::byte>(&option_.version )->default_value (0 ),
146- " The desired version number."
147- )
148- (
149- " BASE16" ,
150- value<system::config::base16>(&argument_.base16 ),
151- " The Base16 value to Base58Check encode. If not specified the value is read from STDIN."
152154 );
153155
154156 return options;
@@ -160,12 +162,6 @@ class BCX_API base58check_encode
160162 */
161163 virtual void set_defaults_from_config (po::variables_map& variables)
162164 {
163- const auto & option_version = variables[" version" ];
164- const auto & option_version_config = variables[" wallet.pay_to_public_key_hash_version" ];
165- if (option_version.defaulted () && !option_version_config.defaulted ())
166- {
167- option_.version = option_version_config.as <explorer::config::byte>();
168- }
169165 }
170166
171167 /* *
@@ -179,40 +175,6 @@ class BCX_API base58check_encode
179175
180176 /* Properties */
181177
182- /* *
183- * Get the value of the BASE16 argument.
184- */
185- virtual system::config::base16& get_base16_argument ()
186- {
187- return argument_.base16 ;
188- }
189-
190- /* *
191- * Set the value of the BASE16 argument.
192- */
193- virtual void set_base16_argument (
194- const system::config::base16& value)
195- {
196- argument_.base16 = value;
197- }
198-
199- /* *
200- * Get the value of the version option.
201- */
202- virtual explorer::config::byte& get_version_option ()
203- {
204- return option_.version ;
205- }
206-
207- /* *
208- * Set the value of the version option.
209- */
210- virtual void set_version_option (
211- const explorer::config::byte& value)
212- {
213- option_.version = value;
214- }
215-
216178private:
217179
218180 /* *
@@ -223,11 +185,9 @@ class BCX_API base58check_encode
223185 struct argument
224186 {
225187 argument ()
226- : base16()
227188 {
228189 }
229190
230- system::config::base16 base16;
231191 } argument_;
232192
233193 /* *
@@ -238,11 +198,9 @@ class BCX_API base58check_encode
238198 struct option
239199 {
240200 option ()
241- : version()
242201 {
243202 }
244203
245- explorer::config::byte version;
246204 } option_;
247205};
248206
0 commit comments