pub fn new(cfg: &config::Config) -> SpendIndex {
        let dir = &cfg.root.clone().join("spend-index");

        let mut fileset = FlatFileSet::new(
            dir, "si-", FILE_SIZE, MAX_CONTENT_SIZE);

        let bitvector = fileset.read_mut_slice(RecordPtr::new(0), VEC_SIZE);
        SpendIndex {
            fileset: fileset,
            bitvector: bitvector
        }
    }
/// Opens the spend_index at the location given in the config
///
/// Creates a new fileset if needed
Opens the spend_index at the location given in the config
Creates a new fileset if needed
Opens the spend_index at the location given in the config Creates a new fileset if needed
pub fn new(cfg: &config::Config) -> SpendIndex {
        let dir = &cfg.root.clone().join("spend-index");
        let mut fileset = FlatFileSet::new(
            dir, "si-", FILE_SIZE, MAX_CONTENT_SIZE);
        let bitvector = fileset.read_mut_slice(RecordPtr::new(0), VEC_SIZE);
        SpendIndex {
            fileset: fileset,
            bitvector: bitvector
        }
    }
pub fn new ( cfg : & config :: Config ) -> SpendIndex { let dir = & cfg . root . clone ( ) . join ( " " ) ; let mut fileset = FlatFileSet :: new ( dir , " " , FILE_SIZE , MAX_CONTENT_SIZE ) ; let bitvector = fileset . read_mut_slice ( RecordPtr :: new ( 0 ) , VEC_SIZE ) ; SpendIndex { fileset : fileset , bitvector : bitvector } }
Opens the spend_index at the location given in the config
Creates a new fileset if needed
Opens the spend_index at the location given in the config Creates a new fileset if needed
cfg
&config::Config
cfg
&config::Config