add timestamp.ml
WIP better time revert this?
This commit is contained in:
parent
d760a54b61
commit
d7d302bafa
10 changed files with 143 additions and 142 deletions
|
|
@ -4,10 +4,10 @@ type t = {
|
|||
pub: RsaPublicKey.t;
|
||||
section_name: string;
|
||||
value: Amount.t;
|
||||
stamp_start: Ptime.t;
|
||||
stamp_expire_withdraw: Ptime.t;
|
||||
stamp_expire_deposit: Ptime.t;
|
||||
stamp_expire_legal: Ptime.t;
|
||||
stamp_start: Timestamp.t;
|
||||
stamp_expire_withdraw: Timestamp.t;
|
||||
stamp_expire_deposit: Timestamp.t;
|
||||
stamp_expire_legal: Timestamp.t;
|
||||
fee_withdraw: Amount.t;
|
||||
fee_deposit: Amount.t;
|
||||
fee_refresh: Amount.t;
|
||||
|
|
@ -36,14 +36,16 @@ let make
|
|||
Config.Coin.t) =
|
||||
assert (cipher = `RSA);
|
||||
|
||||
let stamp_start = Ptime_clock.now () in
|
||||
let stamp_start = Ptime_clock.now () |> Option.some in
|
||||
let stamp_expire_withdraw =
|
||||
Util.ptime_add_span_exn stamp_start duration_withdraw
|
||||
Timestamp.add_span_exn stamp_start (Some duration_withdraw)
|
||||
in
|
||||
let stamp_expire_deposit =
|
||||
Util.ptime_add_span_exn stamp_start duration_spend
|
||||
Timestamp.add_span_exn stamp_start (Some duration_spend)
|
||||
in
|
||||
let stamp_expire_legal =
|
||||
Timestamp.add_span_exn stamp_start (Some duration_legal)
|
||||
in
|
||||
let stamp_expire_legal = Util.ptime_add_span_exn stamp_start duration_legal in
|
||||
|
||||
let open Mirage_crypto_pk.Rsa in
|
||||
let priv = generate ~bits:rsa_keysize () in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue