Select Language

AI社区

公开数据集

闪电网络(LND)图更新(2周)

闪电网络(LND)图更新(2周)

317 浏览
0 喜欢
1 次下载
0 条讨论
Computer Science,Internet,Programming,Finance,Economics Classification

数据结构 ? 0M

    Data Structure ?

    * 以上分析是由系统提取分析形成的结果,具体实际数据为准。

    README.md

    ## Donations If you find this dataset helpful consider donating to this BTC address - `3QY74P79ZFbyqxBESGgSkH3tTaF3X1ED7e` Donations help with server and storage costs to continue supplying datasets like this and other experiments to share in the open with the public. ## Overview This dataset was collected from Feb 2nd 2019 - Feb 14th 2019 from an LND node running on mainnet. There are approx. ~650k channel and node updates included in this data set. Since the data is stored in JSON I used shortkeys when saving the data. It should be easy to deserialize the data and I've included the code to do it below. To deserialize the data you would want to do something like this - const data = require('graphupdates.json'); const deserializedData = data.map(datum => new SerializedUpdate(datum).deserialize()); Make sure to insert the classes below in to your code somewhere so they can be used by the above loop function. const ChannelUpdate = { id: 'i', base_fee_mtokens: 'a', capacity: 'b', cltv_delta: 'c', fee_rate: 'd', is_disabled: 'e', min_htlc_mtokens: 'f', public_keys: 'g', transaction_id: 'h', transaction_vout: 'j', type: 't', updated_at: 'u' } const ChannelClosedUpdate = { capacity: 'k', id: 'i', close_height: 'l', transaction_id: 'm', transaction_vout: 'n', type: 't', updated_at: 'u' } const NodeUpdate = { alias: 'o', color: 'a', public_key: 'p', sockets: 'q', type: 'r', updated_at: 's' } class SerializedUpdate { constructor(data, classToUse) { Object.keys(data).forEach(key => { let value = data[key]; this[classToUse[key]] = value; }); } deserialize() { const classToUse = this.t === 'node_update' ? NodeUpdate : (this.t === 'channel_update' ? ChannelUpdate : ChannelClosedUpdate); Object.keys(classToUse).forEach(key => { let shortKey = classToUse[key]; let value = this[shortKey]; this[key] = value; delete this[shortKey]; }); } }
    ×

    帕依提提提温馨提示

    该数据集正在整理中,为您准备了其他渠道,请您使用

    注:部分数据正在处理中,未能直接提供下载,还请大家理解和支持。
    暂无相关内容。
    暂无相关内容。
    • 分享你的想法
    去分享你的想法~~

    全部内容

      欢迎交流分享
      开始分享您的观点和意见,和大家一起交流分享.
    所需积分:0 去赚积分?
    • 317浏览
    • 1下载
    • 0点赞
    • 收藏
    • 分享