MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / SetPos

Method SetPos

src/commons/serialize.h:1464–1475  ·  view source on GitHub ↗

rewind to a given reading position

Source from the content-addressed store, hash-verified

1462
1463 // rewind to a given reading position
1464 bool SetPos(uint64_t nPos) {
1465 nReadPos = nPos;
1466 if (nReadPos + nRewind < nSrcPos) {
1467 nReadPos = nSrcPos - nRewind;
1468 return false;
1469 } else if (nReadPos > nSrcPos) {
1470 nReadPos = nSrcPos;
1471 return false;
1472 } else {
1473 return true;
1474 }
1475 }
1476
1477 bool Seek(uint64_t nPos) {
1478 long nLongPos = nPos;

Callers 1

LoadExternalBlockFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected