I hereby claim:
- I am vagabond on github.
- I am andrewthompson (https://keybase.io/andrewthompson) on keybase.
- I have a public key ASBjgnJmEQD9h7wni6HU_KXKjOWNpjFxBwktiltg7IvcHwo
To claim this, I am signing this object:
#!/bin/bash | |
# For each staked validator, get the release version | |
# command to call miner of the desired validator to use | |
MINER=./_build/validator/rel/miner/bin/miner | |
VALS=$(${MINER} ledger validators --format csv -v | awk -F, '$7 == "staked" {print $2}') | |
${MINER} ledger validators --format csv -v | awk -F, '$7 == "staked" {print $2}' | xargs -P 0 -I{} ${MINER} peer connect /p2p/{} |
I hereby claim:
To claim this, I am signing this object:
Here's my proposal on the general steps to modernize Riak's repos to work with OTP20 and rebar3:
-module(hashmap_eqc). | |
%% include some quickcheck headers | |
-include_lib("eqc/include/eqc.hrl"). | |
-include_lib("eqc/include/eqc_statem.hrl"). | |
%% include the eqc-c generated header | |
-include("hashmap.hrl"). | |
%% function to initialize the model state |
-: 1:#include "utils/hashmap.h" | |
-: 2:#include <stdint.h> | |
-: 3:#include <stdlib.h> | |
-: 4:#include <string.h> | |
-: 5:#include <math.h> | |
-: 6: | |
-: 7:#define FNV_32_PRIME ((uint32_t)0x01000193) | |
-: 8:#define FNV1_32_INIT ((uint32_t)2166136261) | |
-: 9:#define TINY_MASK(x) (((uint32_t)1<<(x))-1) | |
-: 10:#define BUCKETS_SIZE(x) (pow(2,(x))) |
hashmap_iter_delete_pre(S) -> | |
S#state.hashmap /= undefined. | |
hashmap_iter_delete_args(S = #state{map=Map}) when length(Map) > 0 -> | |
[S#state.hashmap, | |
eqc_gen:oneof([eqc_gen:elements(element(1, lists:unzip(S#state.map))), | |
?SUCHTHAT(X1, eqc_gen:list(eqc_gen:char()), length(X1) > 0)])]; | |
hashmap_iter_delete_args(S) -> | |
[S#state.hashmap, ?SUCHTHAT(X1, eqc_gen:list(eqc_gen:char()), length(X1) > 0)]. |
hashmap_replace_pre(S) -> | |
S#state.hashmap /= undefined andalso length(S#state.map) > 0. | |
hashmap_replace_args(S) -> | |
{Keys, Values} = lists:unzip(S#state.map), | |
[S#state.hashmap, eqc_gen:oneof(Keys), | |
?SUCHTHAT(X2, eqc_gen:list(eqc_gen:char()), length(X2) > 0 andalso not lists:member(X2, Values))]. | |
hashmap_replace(Hashmap, Key, Value) -> | |
KeyStr = eqc_c:create_string(Key), |
hashmap_compare_pre(S) -> | |
S#state.hashmap /= undefined. | |
hashmap_compare_args(S) -> | |
[S#state.hashmap]. | |
hashmap_compare(Hashmap) -> | |
Iter = eqc_c:alloc({struct, iterator_t}), | |
hashmap:hashmap_iter_begin(Hashmap, Iter), | |
R = dump_hash(Iter, []), |
hashmap_delete_pre(S) -> | |
S#state.hashmap /= undefined. | |
hashmap_delete_args(S = #state{map=Map}) when length(Map) > 0 -> | |
[S#state.hashmap, | |
eqc_gen:oneof([eqc_gen:elements(element(1, lists:unzip(S#state.map))), | |
?SUCHTHAT(X1, eqc_gen:list(eqc_gen:char()), length(X1) > 0)])]; | |
hashmap_delete_args(S) -> | |
[S#state.hashmap, ?SUCHTHAT(X1, eqc_gen:list(eqc_gen:char()), length(X1) > 0)]. |
hashmap_clear_pre(S) -> | |
S#state.hashmap /= undefined. | |
hashmap_clear_args(S) -> | |
[S#state.hashmap]. | |
hashmap_clear(Hashmap) -> | |
hashmap:hashmap_clear(Hashmap). | |
hashmap_clear_next(S, _R, [_]) -> |