Skip to content

Commit 97958bd

Browse files
committed
Fixed objectBlockCount not getting casted to long
1 parent e0a4bd8 commit 97958bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/multichain/command/BlockCommand.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ public long getBlockCount() throws MultichainException {
204204
Object objectBlockCount = executeGetBlockCount();
205205
if (verifyInstance(objectBlockCount, long.class)) {
206206
stringBlockCount = (long) objectBlockCount;
207+
} else if (verifyInstance(objectBlockCount, Double.class)) {
208+
stringBlockCount = ((Double)objectBlockCount).longValue();
207209
}
208210

209211
return stringBlockCount;

0 commit comments

Comments
 (0)