I hereby claim:
- I am riemannulus on github.
- I am riemannulus (https://keybase.io/riemannulus) on keybase.
- I have a public key ASAd_FhiK4sqZG8IN54qYgQQo6gNXRL4hS5nKCKkAsnm0Ao
To claim this, I am signing this object:
[Pure] | |
internal class AccountStateDeltaImpl : IValidatorSupportStateDelta, IAccountStateDelta | |
{ | |
[Pure] | |
IAccount? IAccountStateView.GetAccount(Address address) | |
{ | |
return UpdatedAccount.TryGetValue(address, out IAccount? account) | |
? account | |
: AccountGetter(address); | |
} |
class StateDeltaImpl : IAccountStateDelta, IValidatorStateDelta, IGasStateDelta { | |
[Pure] | |
IReadOnlyList<IValue?> IAccountStateView.GetStates(IReadOnlyList<Address> addresses) | |
{ | |
ActionContext.GetStateTimer.Value?.Start(); | |
int length = addresses.Count; | |
// note gas is does not static value | |
AddGas(length) | |
IAccountStateDelta Execute(IActionContext context) | |
{ | |
UInt256 gasCap = context.AvaliableGas(); | |
UInt256 HASGas = 10; | |
if(gasCap < HASGas) | |
{ | |
return context.PreivousState.UseGas(gasCap); | |
} | |
return Battle(context).UseGas(HASGas); | |
} |
IEnumerable<ActionEvaluation> EvaluateBlock(IPreEvaluationBlock block, IAccountStateDelta prevState) | |
{ | |
UInt256 remainingGasPerBlock = block.GasLimit(); | |
IEnumerable<ActionEvaluation> evaluations | |
= ExecuteActions(_beginBlockActions, prevState, remainingGasPerBlock, 0); | |
foreach(ActionEvaluation eval in evaluations) | |
{ | |
yield return eval; | |
prevState = eval.OutputState.UseGas(0); | |
} |
#!/usr/bin/env bash | |
base_url=${1:-https://9c-snapshot-dev.s3.us-east-2.amazonaws.com/9c-pbft-internal} | |
save_dir=${2:-"9c-main-snapshot_$(date +%Y%m%d_%H)"} | |
echo "Start download snapshot" | |
# strip tailing slash | |
base_url=${base_url%/} | |
function get_snapshot_value() { |
public async Task StartAsync(CancellationToken ctx) | |
{ | |
_cancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(ctx); | |
Task transportTask = _transport.StartAsync(ctx); | |
await _transport.WaitForRunningAsync(); | |
try | |
{ | |
await _protocol.BootstrapAsync(_seeds, TimeSpan.FromSeconds(1), 3, ctx); | |
} | |
catch (PeerDiscoveryException pde) |
public async Task WaitForUntilLeast23NodeAlive(CancellationToken ctx) | |
{ | |
async Task<bool> PongResponse(BoundPeer peer) | |
{ | |
try | |
{ | |
var result = await _transport.SendMessageAsync( | |
peer, | |
new PingMsg(), | |
TimeSpan.FromSeconds(1), |
function add_upstream() { | |
url=$(git config --get remote.origin.url) | |
repo=${url##*/} | |
if [[ "$repo" =~ ".git" ]]; then | |
repo=$(echo "$repo" | awk -F. '{print $1}') | |
fi | |
user=$(echo "$url" | awk -F/ '{print $4}') | |
if [ -z "$user" ]; then | |
user=$(echo "$url" | awk -F: '{print $2}' | awk -F/ '{print $1}') | |
fi |
#!/bin/bash | |
# Copyright 2016 Google Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
I hereby claim:
To claim this, I am signing this object: