// It must not match any test hashes.
var BadBlock = []byte("The magic words are squeamish ossifrage.")
+// Empty block
+var EmptyHash = "d41d8cd98f00b204e9800998ecf8427e"
+var EmptyBlock = []byte("")
+
// TODO(twp): Tests still to be written
//
// * TestPutBlockFull
// Check that PutBlock returns the expected error when the hash does
// not match the block.
if _, err := PutBlock(BadBlock, TestHash); err != RequestHashError {
- t.Error("Expected RequestHashError, got %v", err)
+ t.Errorf("Expected RequestHashError, got %v", err)
}
// Confirm that GetBlock fails to return anything.