This repository was archived by the owner on Mar 4, 2024. It is now read-only.
File tree 2 files changed +0
-43
lines changed
2 files changed +0
-43
lines changed Original file line number Diff line number Diff line change @@ -548,42 +548,3 @@ void uvDecodeEntriesBatch(uint8_t *batch,
548
548
}
549
549
}
550
550
}
551
-
552
- int uvEncodeSnapshotMeta (const struct raft_configuration * conf ,
553
- raft_index conf_index ,
554
- struct raft_buffer * buf )
555
- {
556
- size_t conf_len ;
557
- void * cursor ;
558
- uint64_t * header ;
559
- void * conf_buf ;
560
- unsigned crc ;
561
-
562
- conf_len = configurationEncodedSize (conf );
563
-
564
- buf -> len = sizeof (* header ) * 4 ; /* Format, CRC, configuration index/len */
565
- buf -> len += conf_len ;
566
- buf -> base = raft_malloc (buf -> len );
567
- if (buf -> base == NULL ) {
568
- return RAFT_NOMEM ;
569
- }
570
-
571
- header = buf -> base ;
572
- conf_buf = header + 4 ;
573
-
574
- configurationEncodeToBuf (conf , conf_buf );
575
-
576
- cursor = header ;
577
- bytePut64 (& cursor , UV__DISK_FORMAT );
578
- bytePut64 (& cursor , 0 );
579
- bytePut64 (& cursor , conf_index );
580
- bytePut64 (& cursor , conf_len );
581
-
582
- crc = byteCrc32 (& header [2 ], sizeof (uint64_t ) * 2 , 0 ); /* Conf index/len */
583
- crc = byteCrc32 (conf_buf , conf_len , crc );
584
-
585
- cursor = & header [1 ];
586
- bytePut64 (& cursor , crc );
587
-
588
- return 0 ;
589
- }
Original file line number Diff line number Diff line change @@ -56,9 +56,5 @@ void uvEncodeBatchHeader(const struct raft_entry *entries,
56
56
unsigned n ,
57
57
void * buf );
58
58
59
- /* Encode the content of a snapshot metadata file. */
60
- int uvEncodeSnapshotMeta (const struct raft_configuration * conf ,
61
- raft_index conf_index ,
62
- struct raft_buffer * buf );
63
59
64
60
#endif /* UV_ENCODING_H_ */
You can’t perform that action at this time.
0 commit comments