示例#1
0
int pstore_save_tx(tx_t *tx)
{
    unsigned char *data = (unsigned char *)tx;
    size_t data_len;

    data_len = get_tx_size(tx);
    if (!data_len)
        return (SHERR_INVAL);

    return (pstore_save(data, data_len));
}
示例#2
0
int tx_save(void *raw_tx)
{
  tx_t *tx = (tx_t *)raw_tx;
  int err;

  if (!is_tx_stored(tx->tx_op))
    return (0);

  err = pstore_save(raw_tx, get_tx_size(tx));
  if (err)
    return (err);

  return (0);
}
示例#3
0
void save_bond(tx_bond_t *bond)
{
  pstore_save(bond, sizeof(tx_bond_t));
}
示例#4
0
void save_asset(tx_asset_t *asset)
{
  pstore_save(asset, sizeof(tx_asset_t));
}