2019-03-06 04:22:45 +00:00
|
|
|
use crate::errors::{TransferInvalid as Invalid, TransferValidationError as Error};
|
|
|
|
use types::*;
|
|
|
|
|
2019-03-06 05:24:56 +00:00
|
|
|
/// Indicates if a `Transfer` is valid to be included in a block in the current epoch of the given
|
|
|
|
/// state.
|
2019-03-06 04:22:45 +00:00
|
|
|
///
|
2019-03-06 05:24:56 +00:00
|
|
|
/// Returns `Ok(())` if the `Transfer` is valid, otherwise indicates the reason for invalidity.
|
|
|
|
///
|
|
|
|
/// Note: this function is incomplete.
|
2019-03-06 04:22:45 +00:00
|
|
|
///
|
|
|
|
/// Spec v0.4.0
|
|
|
|
pub fn verify_transfer(
|
2019-03-06 05:24:56 +00:00
|
|
|
_state: &BeaconState,
|
|
|
|
_transfer: &Transfer,
|
|
|
|
_spec: &ChainSpec,
|
2019-03-06 04:22:45 +00:00
|
|
|
) -> Result<(), Error> {
|
|
|
|
// TODO: verify transfer.
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|