Fix network connection:
+ inbound connection GET_HASHES fix
This commit is contained in:
parent
e8eaa4f6f9
commit
c271346a4f
|
@ -67,8 +67,9 @@ public class BlockStore {
|
||||||
if (block == null) return hashes;
|
if (block == null) return hashes;
|
||||||
|
|
||||||
List<byte[]> result = sessionFactory.getCurrentSession().
|
List<byte[]> result = sessionFactory.getCurrentSession().
|
||||||
createQuery("from BlockVO.hash where number >= :number").
|
createQuery("select hash from BlockVO where number <= :number and number >= :limit order by number desc").
|
||||||
setParameter("number", block.getNumber()).
|
setParameter("number", block.getNumber()).
|
||||||
|
setParameter("limit", block.getNumber() - qty).
|
||||||
setMaxResults(qty).list();
|
setMaxResults(qty).list();
|
||||||
|
|
||||||
for (byte[] h : result){
|
for (byte[] h : result){
|
||||||
|
|
Loading…
Reference in New Issue