Sha256: b831cdde4d9bebf58bec995ea1921f0a7db8626fe42227a5ae6f15ef3633a575

Contents?: true

Size: 440 Bytes

Versions: 1

Compression:

Stored size: 440 Bytes

Contents

import { fetchHeadersAt, fetchHeadersLast } from '../../api-node/blocks';
export default function (base) {
    return fetchHeadersLast(base).then(header => {
        const firstHeight = Math.max(2, header.height - 1000);
        return fetchHeadersAt(base, firstHeight)
            .then(oldHeader => Math.floor((header.timestamp - oldHeader.timestamp) / (header.height - firstHeight)));
    });
}
//# sourceMappingURL=detectInterval.js.map

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waves_lib-0.1.0 js/node_modules/@waves/node-api-js/es/tools/blocks/detectInterval.js