Version Info API Function tweak, remove 'min_compat_version' from slate (#123)

* change slate version function to return list of supported slate formats

* rustfmt

* remove min_compat_version
This commit is contained in:
Yeastplume
2019-05-30 09:34:04 +01:00
committed by GitHub
parent 757dfd0d91
commit af16dea6e1
10 changed files with 43 additions and 37 deletions
+5 -3
View File
@@ -13,12 +13,14 @@
// limitations under the License.
//! Generic implementation of owner API functions
use strum::IntoEnumIterator;
use crate::grin_keychain::Keychain;
use crate::internal::{tx, updater};
use crate::slate_versions::SlateVersion;
use crate::{
slate_versions, BlockFees, CbData, Error, ErrorKind, NodeClient, Slate, TxLogEntryType,
VersionInfo, WalletBackend,
BlockFees, CbData, Error, ErrorKind, NodeClient, Slate, TxLogEntryType, VersionInfo,
WalletBackend,
};
const FOREIGN_API_VERSION: u16 = 2;
@@ -28,7 +30,7 @@ const USER_MESSAGE_MAX_LEN: usize = 256;
pub fn check_version() -> VersionInfo {
VersionInfo {
foreign_api_version: FOREIGN_API_VERSION,
default_slate_version: slate_versions::CURRENT_SLATE_VERSION,
supported_slate_versions: SlateVersion::iter().collect(),
}
}
+2 -1
View File
@@ -18,6 +18,7 @@ use crate::grin_core::core::{Output, TxKernel};
use crate::grin_core::libtx::secp_ser;
use crate::grin_keychain::Identifier;
use crate::grin_util::secp::pedersen;
use crate::slate_versions::SlateVersion;
use crate::types::OutputData;
/// Send TX API Args
@@ -218,5 +219,5 @@ pub struct VersionInfo {
/// API version
pub foreign_api_version: u16,
/// Slate version
pub default_slate_version: u16,
pub supported_slate_versions: Vec<SlateVersion>,
}