Skip to content

Commit aea9433

Browse files
authored
Merge pull request #12 from disintar/dev
Fix prev_blocks
2 parents 4899a8b + 3b1481b commit aea9433

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.github/workflows/wheels-dev.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,42 @@ jobs:
2323
- arch: aarch64
2424
os: macos-15
2525
python: "3.13"
26-
link: https://github.com/disintar/ton/releases/download/ton-cpython-313-aarch64-darwin/
26+
link: https://github.com/disintar/ton/releases/download/ton-cpython-313-aarch64-darwin-dev/
2727
file: python_ton.cpython-313-darwin.so
2828
fix_tag: arm64
2929

3030
- arch: aarch64
3131
os: macos-15
3232
python: "3.10"
33-
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-aarch64-darwin/
33+
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-aarch64-darwin-dev/
3434
file: python_ton.cpython-310-darwin.so
3535
fix_tag: arm64
3636

3737
- arch: aarch64
3838
os: macos-15
3939
python: "3.12"
40-
link: https://github.com/disintar/ton/releases/download/ton-cpython-312-aarch64-darwin/
40+
link: https://github.com/disintar/ton/releases/download/ton-cpython-312-aarch64-darwin-dev/
4141
file: python_ton.cpython-312-darwin.so
4242
fix_tag: arm64
4343

4444
- arch: x86_64
4545
os: arc-runner-set
4646
python: "3.13"
47-
link: https://github.com/disintar/ton/releases/download/ton-cpython-313-x86_64-linux/
47+
link: https://github.com/disintar/ton/releases/download/ton-cpython-313-x86_64-linux-dev/
4848
file: python_ton.cpython-313-x86_64-linux-gnu.so
4949
fix_tag: manylinux2014_x86_64
5050

5151
- arch: x86_64
5252
os: arc-runner-set
5353
python: "3.12"
54-
link: https://github.com/disintar/ton/releases/download/ton-cpython-312-x86_64-linux/
54+
link: https://github.com/disintar/ton/releases/download/ton-cpython-312-x86_64-linux-dev/
5555
file: python_ton.cpython-312-x86_64-linux-gnu.so
5656
fix_tag: manylinux2014_x86_64
5757

5858
- arch: x86_64
5959
os: arc-runner-set
6060
python: "3.10"
61-
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-x86_64-linux/
61+
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-x86_64-linux-dev/
6262
file: python_ton.cpython-310-x86_64-linux-gnu.so
6363
fix_tag: manylinux2014_x86_64
6464

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def finalize_options(self):
3131

3232
setup(
3333
name="tonpy" if not IS_DEV else "tonpy-dev",
34-
version="0.0.0.1.3b0" if not IS_DEV else "0.0.0.5.9c1",
34+
version="0.0.0.1.3c0" if not IS_DEV else "0.0.0.5.9c1",
3535
author="Disintar LLP",
3636
author_email="andrey@head-labs.com",
3737
description="Types / API for TON blockchain",

src/tonpy/blockscanner/blockscanner.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,9 @@ def prepare_prev_block_data(self, shards_data, mc_data):
805805
known_prev_block_data = {}
806806

807807
for x in mc_data:
808-
prev_blocks = []
808+
prev_blocks = [
809+
x['block_id'].to_data_nullabe_hashes()
810+
]
809811
prev_blocks_100 = []
810812

811813
for i in range(x['block_id'].id.seqno - 16, x['block_id'].id.seqno):
@@ -840,7 +842,9 @@ def prepare_prev_block_data(self, shards_data, mc_data):
840842
if i['master'] in known_prev_block_data:
841843
i['prev_block_data'] = known_prev_block_data[i['master']]
842844
else:
843-
prev_blocks = []
845+
prev_blocks = [
846+
i['master'].to_data_nullabe_hashes()
847+
]
844848
prev_blocks_100 = []
845849
for j in range(i['master'] - 16, i['master']):
846850
prev_blocks.append(known_mcs[j].to_data())

src/tonpy/types/blockid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def __repr__(self):
5555
def __eq__(self, other):
5656
return self.workchain == other.workchain and self.shard == other.shard and self.seqno == other.seqno
5757

58+
def to_data_nullabe_hashes(self):
59+
return [self.id.workchain, self.id.shard, self.id.seqno, 0, 0]
60+
5861

5962
class BlockIdExt:
6063
__slots__ = ['id', 'file_hash', 'root_hash', 'blockidext']

0 commit comments

Comments
 (0)