Skip to content

Instantly share code, notes, and snippets.

@0x009922
0x009922 / stress.rs
Created March 11, 2025 00:11
Iroha - sync issue reproduction
use std::{
iter::once,
num::NonZero,
ops::{ControlFlow, RangeInclusive},
sync::Arc,
time::Duration,
};
use assert_matches::assert_matches;
use eyre::{bail, eyre, Result};
@0x009922
0x009922 / sample.ts
Created January 15, 2025 04:44
Iroha JS v7.0.0 - missing feature of Query pagination and batches
import { ToriiRequirementsForApiHttp } from '@iroha2/client'
import { datamodel } from '@iroha2/data-model'
interface QueryParams {
start?: number
limit?: number
sortByMetadataKey?: string
}
async function* queryBatches(
import { CamelCase, Simplify } from 'type-fest'
declare const create: <B extends string>(blockName: B) => BlockBuilder<B>
interface BlockBuilder<R extends string, M extends ModifiersArray = [], E extends BuiltElem<any, any>[] = []> {
mod: {
<B extends AnyBlockBuilder, M extends string>(this: B, name: M): ExtendsBlockModifiers<B, M>
<B extends BlockBuilder<any, any>, M extends string, V extends string>(
this: B,
modName: M,